1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Limit template expansion of possibly-mixed vars

This commit is contained in:
Matthew Brown 2019-06-25 23:43:25 -04:00
parent 3a52ccd5a6
commit 70a1696a04
2 changed files with 2 additions and 2 deletions

View File

@ -1207,7 +1207,7 @@ class Union
} else {
$matching_atomic_type = null;
if ($input_type && $codebase) {
if ($input_type && $codebase && !$input_type->hasMixed()) {
foreach ($input_type->types as $input_key => $atomic_input_type) {
if ($bracket_pos = strpos($input_key, '<')) {
$input_key = substr($input_key, 0, $bracket_pos);

View File

@ -1441,7 +1441,7 @@ class TypeReconciliationTest extends TestCase
}
}',
[],
['MixedArgument', 'MixedArrayAccess']
['MixedArgument', 'MixedArrayAccess', 'MixedAssignment', 'MixedArrayOffset']
],
];
}