[FIR] Check is for impossibility

^KT-58203 Fixed
^KT-62646
This commit is contained in:
Nikolay Lunyak
2024-02-29 15:39:33 +02:00
committed by Space Team
parent 92d8da621e
commit 88ff93df7f
42 changed files with 110 additions and 83 deletions
@@ -11,7 +11,7 @@ fun test_1(e: Enum) {
val b = <!NO_ELSE_IN_WHEN!>when<!> (e) {
Enum.A -> 1
Enum.B -> 2
is String -> 3
<!USELESS_IS_CHECK!>is String<!> -> 3
}
val c = when (e) {
@@ -15,7 +15,7 @@ fun test_1(e: JavaEnum) {
val b = <!NO_ELSE_IN_WHEN!>when<!> (e) {
JavaEnum.A -> 1
JavaEnum.B -> 2
is String -> 3
<!USELESS_IS_CHECK!>is String<!> -> 3
}.plus(0)
val c = when (e) {
@@ -15,7 +15,7 @@ fun test_1(e: Base) {
val b = <!NO_ELSE_IN_WHEN!>when<!> (e) {
is Base.A -> 1
is Base.A.B -> 2
is String -> 3
<!USELESS_IS_CHECK!>is String<!> -> 3
}
val c = when (e) {