[FIR JS] Support smart casts for dynamic

This commit is contained in:
Nikolay Lunyak
2021-12-30 18:12:45 +03:00
committed by teamcity
parent bdc3b5fe6f
commit 611691ec70
24 changed files with 152 additions and 139 deletions
@@ -230,7 +230,7 @@ internal class KtFirExpressionTypeProvider(
}
when (val fir = expression.getOrBuildFir(analysisSession.firResolveSession)) {
is FirExpressionWithSmartcastToNull -> if (fir.isStable) {
is FirExpressionWithSmartcastToNothing -> if (fir.isStable) {
return DefiniteNullability.DEFINITELY_NULL
}
is FirExpressionWithSmartcast -> if (fir.isStable && fir.isNotNullable()) {