mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Mixed value object-likes should still have string keys
This commit is contained in:
parent
4db8ca6a1d
commit
5a5629b835
@ -181,7 +181,7 @@ class ObjectLike extends \Psalm\Type\Atomic
|
||||
public function getGenericKeyType()
|
||||
{
|
||||
if ($this->had_mixed_value) {
|
||||
return Type::getArrayKey();
|
||||
return Type::getString();
|
||||
}
|
||||
|
||||
$key_types = [];
|
||||
@ -233,7 +233,7 @@ class ObjectLike extends \Psalm\Type\Atomic
|
||||
public function getGenericArrayType()
|
||||
{
|
||||
if ($this->had_mixed_value) {
|
||||
return new TNonEmptyArray([Type::getArrayKey(), Type::getMixed()]);
|
||||
return new TNonEmptyArray([Type::getString(), Type::getMixed()]);
|
||||
}
|
||||
|
||||
$key_types = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user