Gracefully handle erroneous super type during local type approximation
^KTIJ-23528 Fixed
This commit is contained in:
committed by
Ilya Kirillov
parent
f775778efa
commit
c79d65536b
+2
-2
@@ -179,8 +179,8 @@ abstract class AbstractTypeApproximator(
|
||||
errorTypesEqualToAnything = false,
|
||||
stubTypesEqualToAnything = false
|
||||
)
|
||||
return AbstractTypeChecker.findCorrespondingSupertypes(typeCheckerContext, type, superConstructor).first()
|
||||
.withNullability(type.isMarkedNullable())
|
||||
return AbstractTypeChecker.findCorrespondingSupertypes(typeCheckerContext, type, superConstructor).firstOrNull()
|
||||
?.withNullability(type.isMarkedNullable())
|
||||
}
|
||||
|
||||
private fun isIntersectionTypeEffectivelyNothing(constructor: IntersectionTypeConstructorMarker): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user