Skip to content

Commit 96ce488

Browse files
committed
Generic key type cannot be undefined
Fixes #3905
1 parent 7367e8e commit 96ce488

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Psalm/Type/Atomic/ObjectLike.php

+2
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ public function getGenericKeyType()
220220

221221
$key_type = TypeCombination::combineTypes($key_types);
222222

223+
$key_type->possibly_undefined = false;
224+
223225
if ($this->previous_key_type) {
224226
$key_type = Type::combineUnionTypes($this->previous_key_type, $key_type);
225227
}

0 commit comments

Comments
 (0)