FIR: Support exhaustive whens on subjects of intersection type
This commit is contained in:
+2
-2
@@ -10,7 +10,7 @@ object CC : C()
|
||||
fun foo(a: A) {
|
||||
if (a is B) {
|
||||
if (a is C) {
|
||||
val t = <!NO_ELSE_IN_WHEN!>when<!> (a) {
|
||||
val t = when (a) {
|
||||
is CC -> "CC"
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ fun foo(a: A) {
|
||||
fun foo2(a: A) {
|
||||
if (a is C) {
|
||||
if (a is B) {
|
||||
val t = <!NO_ELSE_IN_WHEN!>when<!> (a) {
|
||||
val t = when (a) {
|
||||
is CC -> "CC"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user