Add test for exhaustive when with subject of Boolean! type
This commit is contained in:
committed by
teamcityserver
parent
09994ee8ea
commit
8a2e0cedf9
@@ -0,0 +1,21 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: Provider.java
|
||||
|
||||
public class Provider {
|
||||
public static Boolean getCondition() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun test_1(): Int = when (Provider.getCondition()) {
|
||||
true -> 1
|
||||
false -> 2
|
||||
}
|
||||
|
||||
fun test_2(): Int = when (Provider.getCondition()) {
|
||||
true -> 1
|
||||
false -> 2
|
||||
null -> 3
|
||||
}
|
||||
Reference in New Issue
Block a user