1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-03 10:07:52 +01:00

Make sure to set object-like property type if available

This commit is contained in:
Matthew Brown 2016-10-03 10:41:21 -04:00
parent e04441b8ac
commit 89bc501e17

View File

@ -3945,6 +3945,9 @@ class StatementsChecker
elseif ($type instanceof Type\Generic) {
$stmt->inferredType = $type->type_params[$value_index];
}
elseif ($key_value && isset($type->properties[$key_value])) {
$stmt->inferredType = clone $type->properties[$key_value];
}
}
elseif ($type->isString()) {
if ($key_type) {