1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-12 09:19:40 +01:00

bugfix: only allow narrowing down types in case the old type is not single

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
This commit is contained in:
Maximilian Bösing 2022-06-12 01:21:38 +02:00
parent 4ee1b3feb4
commit c68b6e9d26
No known key found for this signature in database
GPG Key ID: 9A8988C93CEC81A3

View File

@ -1139,6 +1139,6 @@ class CallAnalyzer
return true; return true;
} }
return $new_type->allLiterals(); return !$old_type->isSingle();
} }
} }