File tree 1 file changed +2
-5
lines changed
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -5630,12 +5630,9 @@ static function (): void {
5630
5630
$ propertyNativeType = $ propertyReflection ->getNativeType ();
5631
5631
5632
5632
$ newAssignedType = TypeCombinator::intersect ($ assignedExprType , $ propertyNativeType );
5633
- if ($ newAssignedType instanceof NeverType) {
5634
- $ newAssignedType = TypeCombinator::intersect ($ assignedExprType ->toCoercedArgumentType (true ), $ propertyNativeType );
5635
- }
5636
-
5637
5633
$ newAssignedNativeType = TypeCombinator::intersect ($ assignedNativeType , $ propertyNativeType );
5638
- if ($ newAssignedNativeType instanceof NeverType) {
5634
+ if ($ newAssignedType instanceof NeverType || $ newAssignedNativeType instanceof NeverType) {
5635
+ $ newAssignedType = TypeCombinator::intersect ($ assignedExprType ->toCoercedArgumentType (true ), $ propertyNativeType );
5639
5636
$ newAssignedNativeType = TypeCombinator::intersect ($ assignedNativeType ->toCoercedArgumentType (true ), $ propertyNativeType );
5640
5637
}
5641
5638
You can’t perform that action at this time.
0 commit comments