1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 01:37:23 +01:00

polymorphism

This commit is contained in:
orklah 2021-09-25 16:40:52 +02:00
parent 56dcfe8b99
commit 1f2316f124

View File

@ -1455,7 +1455,7 @@ class TypeCombiner
if (is_int($property_name)) {
$objectlike_keys[$property_name] = new TLiteralInt($property_name);
} elseif (isset($type->class_strings[$property_name])) {
} elseif ($type instanceof TKeyedArray && isset($type->class_strings[$property_name])) {
$objectlike_keys[$property_name] = new TLiteralClassString($property_name);
} else {
$objectlike_keys[$property_name] = new TLiteralString($property_name);