FIR: accept when(nothing) {} as exhaustive
FE1.0 accepts this but FIR current rejects it.
This commit is contained in:
committed by
Ilya Kirillov
parent
26e3237b8c
commit
6ec247b861
+9
@@ -0,0 +1,9 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNREACHABLE_CODE
|
||||
|
||||
typealias MyNothing = Nothing
|
||||
|
||||
fun foo(n: Nothing, n2: MyNothing) {
|
||||
val a: Unit = when(n) {}
|
||||
val b: Unit = when(n2) {}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
public fun foo(/*0*/ n: kotlin.Nothing, /*1*/ n2: MyNothing /* = kotlin.Nothing */): kotlin.Unit
|
||||
public typealias MyNothing = kotlin.Nothing
|
||||
Reference in New Issue
Block a user