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:
parent
e04441b8ac
commit
89bc501e17
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user