File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -1219,6 +1219,7 @@ public static function intersect(Type ...$types): Type
1219
1219
if (
1220
1220
$ types [$ i ] instanceof ConstantArrayType
1221
1221
&& count ($ types [$ i ]->getKeyTypes ()) === 1
1222
+ && $ types [$ i ]->isOptionalKey (0 )
1222
1223
&& $ types [$ j ] instanceof NonEmptyArrayType
1223
1224
) {
1224
1225
$ types [$ i ] = $ types [$ i ]->makeOffsetRequired ($ types [$ i ]->getKeyTypes ()[0 ]);
@@ -1230,6 +1231,7 @@ public static function intersect(Type ...$types): Type
1230
1231
if (
1231
1232
$ types [$ j ] instanceof ConstantArrayType
1232
1233
&& count ($ types [$ j ]->getKeyTypes ()) === 1
1234
+ && $ types [$ j ]->isOptionalKey (0 )
1233
1235
&& $ types [$ i ] instanceof NonEmptyArrayType
1234
1236
) {
1235
1237
$ types [$ j ] = $ types [$ j ]->makeOffsetRequired ($ types [$ j ]->getKeyTypes ()[0 ]);
You can’t perform that action at this time.
0 commit comments