Analysis API: add test covering get missing when branches
Also fix FIR implementation to generate boolean branches in the same order as FE1.0.
This commit is contained in:
committed by
Ilya Kirillov
parent
8ba2e4d221
commit
2c2851af6e
+3
-3
@@ -245,12 +245,12 @@ private object WhenOnBooleanExhaustivenessChecker : WhenExhaustivenessChecker()
|
||||
) {
|
||||
val flags = Flags()
|
||||
whenExpression.accept(ConditionChecker, flags)
|
||||
if (!flags.containsFalse) {
|
||||
destination.add(WhenMissingCase.BooleanIsMissing.False)
|
||||
}
|
||||
if (!flags.containsTrue) {
|
||||
destination.add(WhenMissingCase.BooleanIsMissing.True)
|
||||
}
|
||||
if (!flags.containsFalse) {
|
||||
destination.add(WhenMissingCase.BooleanIsMissing.False)
|
||||
}
|
||||
}
|
||||
|
||||
private object ConditionChecker : AbstractConditionChecker<Flags>() {
|
||||
|
||||
Reference in New Issue
Block a user