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:
parent
3a52ccd5a6
commit
70a1696a04
@ -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);
|
||||
|
@ -1441,7 +1441,7 @@ class TypeReconciliationTest extends TestCase
|
||||
}
|
||||
}',
|
||||
[],
|
||||
['MixedArgument', 'MixedArrayAccess']
|
||||
['MixedArgument', 'MixedArrayAccess', 'MixedAssignment', 'MixedArrayOffset']
|
||||
],
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user