FIR: Support exhaustive whens on subjects of intersection type

This commit is contained in:
Denis.Zharkov
2021-06-08 17:59:01 +03:00
parent c8b9a3a6f0
commit 2653565f56
11 changed files with 262 additions and 11 deletions
@@ -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"
}
}