@@ -560,7 +560,7 @@ public function accepts(Type $type, bool $strictTypes): AcceptsResult
560560 $ result = $ result ->and ($ acceptsValue );
561561 }
562562
563- $ otherUnsealed = $ constantArray ->getUnsealedTypes () ;
563+ $ otherUnsealed = $ constantArray ->unsealed ;
564564 if ($ otherUnsealed !== null && !$ constantArray ->isUnsealed ()->no ()) {
565565 [$ otherUnsealedKeyType , $ otherUnsealedValueType ] = $ otherUnsealed ;
566566
@@ -662,7 +662,7 @@ public function isSuperTypeOf(Type $type): IsSuperTypeOfResult
662662 if ($ type instanceof self) {
663663 $ thisUnsealedness = $ this ->isUnsealed ();
664664 $ typeUnsealedness = $ type ->isUnsealed ();
665- $ bothDefinite = ! $ thisUnsealedness -> maybe () && ! $ typeUnsealedness -> maybe () ;
665+ $ bothDefinite = $ this -> unsealed !== null && $ type -> unsealed !== null ;
666666
667667 if (count ($ this ->keyTypes ) === 0 ) {
668668 if (!$ bothDefinite ) {
@@ -678,7 +678,7 @@ public function isSuperTypeOf(Type $type): IsSuperTypeOfResult
678678 foreach ($ this ->keyTypes as $ i => $ keyType ) {
679679 $ hasOffset = $ type ->hasOffsetValueType ($ keyType );
680680 if ($ bothDefinite && $ hasOffset ->no () && $ typeUnsealedness ->yes ()) {
681- [$ typeUnsealedKey ] = $ type ->getUnsealedTypes () ;
681+ [$ typeUnsealedKey ] = $ type ->unsealed ;
682682 if (!$ typeUnsealedKey ->isSuperTypeOf ($ keyType )->no ()) {
683683 $ hasOffset = TrinaryLogic::createMaybe ();
684684 }
@@ -696,7 +696,7 @@ public function isSuperTypeOf(Type $type): IsSuperTypeOfResult
696696
697697 $ otherValueType = $ type ->getOffsetValueType ($ keyType );
698698 if ($ otherValueType instanceof ErrorType && $ bothDefinite && $ typeUnsealedness ->yes ()) {
699- [, $ typeUnsealedValue ] = $ type ->getUnsealedTypes () ;
699+ [, $ typeUnsealedValue ] = $ type ->unsealed ;
700700 $ otherValueType = $ typeUnsealedValue ;
701701 }
702702 $ isValueSuperType = $ this ->valueTypes [$ i ]->isSuperTypeOf ($ otherValueType );
@@ -725,7 +725,7 @@ public function isSuperTypeOf(Type $type): IsSuperTypeOfResult
725725 continue ;
726726 }
727727
728- [$ thisUnsealedKey , $ thisUnsealedValue ] = $ this ->getUnsealedTypes () ;
728+ [$ thisUnsealedKey , $ thisUnsealedValue ] = $ this ->unsealed ;
729729 $ keyCheck = $ thisUnsealedKey ->isSuperTypeOf ($ typeKey );
730730 if ($ keyCheck ->no ()) {
731731 if ($ type ->isOptionalKey ($ i )) {
@@ -749,8 +749,8 @@ public function isSuperTypeOf(Type $type): IsSuperTypeOfResult
749749 if ($ thisUnsealedness ->no ()) {
750750 $ results [] = IsSuperTypeOfResult::createMaybe ();
751751 } else {
752- [$ thisUnsealedKey , $ thisUnsealedValue ] = $ this ->getUnsealedTypes () ;
753- [$ typeUnsealedKey , $ typeUnsealedValue ] = $ type ->getUnsealedTypes () ;
752+ [$ thisUnsealedKey , $ thisUnsealedValue ] = $ this ->unsealed ;
753+ [$ typeUnsealedKey , $ typeUnsealedValue ] = $ type ->unsealed ;
754754 $ results [] = $ thisUnsealedKey ->isSuperTypeOf ($ typeUnsealedKey );
755755 $ results [] = $ thisUnsealedValue ->isSuperTypeOf ($ typeUnsealedValue );
756756 }
0 commit comments