[FIR] Report NON_EXHAUSTIVE_WHEN_STATEMENT/NO_ELSE_IN_WHEN for when's on logical types
^KT-47709 In Progress
This commit is contained in:
committed by
teamcityserver
parent
ef635f6a96
commit
a6edd852ff
@@ -1,20 +0,0 @@
|
||||
fun test1() {
|
||||
if (true) {
|
||||
when (true) {
|
||||
true -> println()
|
||||
}
|
||||
} else {
|
||||
System.out?.println() // kotlin.Unit?
|
||||
}
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
val mlist = arrayListOf("")
|
||||
if (true) {
|
||||
when (true) {
|
||||
true -> println()
|
||||
}
|
||||
} else {
|
||||
mlist.add("") // kotlin.Boolean
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
fun test1() {
|
||||
if (true) {
|
||||
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (true) {
|
||||
|
||||
Reference in New Issue
Block a user