File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -212,10 +212,12 @@ public function asNonLiteralType(Union $type): Union
212212 : new TNonEmptyString (),
213213 $ a instanceof TLiteralInt => new TInt (),
214214 $ a instanceof TLiteralFloat => new TFloat (),
215- $ a instanceof TKeyedArray => new TNonEmptyArray ([
216- self ::asNonLiteralType ($ a ->getGenericKeyType ()),
217- self ::asNonLiteralType ($ a ->getGenericValueType ()),
218- ]),
215+ $ a instanceof TKeyedArray => $ a ->is_list
216+ ? new TNonEmptyList ($ a ->getGenericValueType ())
217+ : new TNonEmptyArray ([
218+ self ::asNonLiteralType ($ a ->getGenericKeyType ()),
219+ self ::asNonLiteralType ($ a ->getGenericValueType ()),
220+ ]),
219221 $ a instanceof TNonEmptyList => new TNonEmptyList (
220222 self ::asNonLiteralType ($ a ->type_param ),
221223 ),
You can’t perform that action at this time.
0 commit comments