Skip to content
Permalink
Browse files

Limit template expansion of possibly-mixed vars

  • Loading branch information...
muglug committed Jun 26, 2019
1 parent 3a52ccd commit 70a1696a041280497e07aa8ccfef6f7bf30f0eff
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/Psalm/Type/Union.php
  2. +1 −1 tests/TypeReconciliationTest.php
@@ -1207,7 +1207,7 @@ public function replaceTemplateTypesWithStandins(
} 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 @@ function foo($clips, bool $found, int $id) : void {
}
}',
[],
['MixedArgument', 'MixedArrayAccess']
['MixedArgument', 'MixedArrayAccess', 'MixedAssignment', 'MixedArrayOffset']
],
];
}

0 comments on commit 70a1696

Please sign in to comment.
You can’t perform that action at this time.