FIR: use withNullability with type context whenever possible
It could simplify flexible type cases.
This commit is contained in:
committed by
TeamCityServer
parent
f94ed1a00c
commit
bb37728e4f
+5
-1
@@ -412,7 +412,11 @@ class FirVisualizer(private val firFile: FirFile) : BaseRenderer() {
|
||||
val lowerRendered = lowerBound.tryToRenderConeAsFunctionType()
|
||||
if (lowerBound.nullability == ConeNullability.NOT_NULL && upperBound.nullability == ConeNullability.NULLABLE &&
|
||||
AbstractStrictEqualityTypeChecker
|
||||
.strictEqualTypes(session.typeContext, lowerBound, upperBound.withNullability(ConeNullability.NOT_NULL))
|
||||
.strictEqualTypes(
|
||||
session.typeContext,
|
||||
lowerBound,
|
||||
upperBound.withNullability(ConeNullability.NOT_NULL, session.typeContext)
|
||||
)
|
||||
) {
|
||||
"$lowerRendered!"
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user