Introduce typeRef for FirExpression
This helps both body resolve & conversion to IR
This commit is contained in:
+3
-3
@@ -100,13 +100,13 @@ open class FirBodyResolveTransformer(val session: FirSession, val implicitTypeOn
|
||||
)
|
||||
}
|
||||
FirOperation.AS -> {
|
||||
bindingContext[resolved] = resolved.typeRef
|
||||
bindingContext[resolved] = resolved.conversionTypeRef
|
||||
}
|
||||
FirOperation.SAFE_AS -> {
|
||||
bindingContext[resolved] =
|
||||
resolved.typeRef.withReplacedConeType(
|
||||
resolved.conversionTypeRef.withReplacedConeType(
|
||||
session,
|
||||
resolved.typeRef.coneTypeUnsafe().withNullability(ConeNullability.NULLABLE)
|
||||
resolved.conversionTypeRef.coneTypeUnsafe().withNullability(ConeNullability.NULLABLE)
|
||||
)
|
||||
}
|
||||
else -> error("Unknown type operator")
|
||||
|
||||
Reference in New Issue
Block a user