[FIR] Assume that when without branches is not exhaustive. KT-39621

This commit is contained in:
Dmitriy Novozhilov
2020-06-16 12:18:07 +03:00
parent 4e2e05e689
commit 8a81a09fd0
@@ -58,6 +58,8 @@ class FirWhenExhaustivenessTransformer(private val bodyResolveComponents: BodyRe
checkBooleanExhaustiveness(whenExpression, nullable)
}
whenExpression.branches.isEmpty() -> false
else -> {
val klass = lookupTag.toSymbol(bodyResolveComponents.session)?.fir as? FirRegularClass ?: return null
when {