[FIR] Assume that when without branches is not exhaustive. KT-39621
This commit is contained in:
+2
@@ -58,6 +58,8 @@ class FirWhenExhaustivenessTransformer(private val bodyResolveComponents: BodyRe
|
|||||||
checkBooleanExhaustiveness(whenExpression, nullable)
|
checkBooleanExhaustiveness(whenExpression, nullable)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
whenExpression.branches.isEmpty() -> false
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
val klass = lookupTag.toSymbol(bodyResolveComponents.session)?.fir as? FirRegularClass ?: return null
|
val klass = lookupTag.toSymbol(bodyResolveComponents.session)?.fir as? FirRegularClass ?: return null
|
||||||
when {
|
when {
|
||||||
|
|||||||
Reference in New Issue
Block a user