FIR resolve: provide unconditional typing for block
This commit is contained in:
committed by
Mikhail Glukhikh
parent
aa5f0fded5
commit
fd279860f7
+2
-1
@@ -511,7 +511,8 @@ open class FirBodyResolveTransformer(val session: FirSession, val implicitTypeOn
|
||||
is FirExpression -> statement
|
||||
else -> null
|
||||
}
|
||||
(resultExpression?.resultType as? FirResolvedTypeRef)?.let { block.resultType = it }
|
||||
block.resultType = (resultExpression?.resultType as? FirResolvedTypeRef) ?: FirErrorTypeRefImpl(session, null, "No type for block")
|
||||
|
||||
return block.compose()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user