[FIR] Support of REDECLARATION for local val/var, ^KT-54405 Fixed
This commit is contained in:
committed by
Space Team
parent
879deb90fc
commit
e49bb1fe37
Vendored
+1
-1
@@ -32,7 +32,7 @@ FILE: missingBooleanBranch.kt
|
||||
}
|
||||
}
|
||||
|
||||
lval x: R|kotlin/Int| = when (R|<local>/cond|) {
|
||||
lval y: R|kotlin/Int| = when (R|<local>/cond|) {
|
||||
==($subj$, Boolean(true)) -> {
|
||||
Int(1)
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -19,7 +19,7 @@ fun test_2(cond: Boolean?) {
|
||||
false -> 2
|
||||
}
|
||||
|
||||
val x = when (cond) {
|
||||
val y = when (cond) {
|
||||
true -> 1
|
||||
false -> 2
|
||||
null -> 3
|
||||
|
||||
Vendored
+2
-2
@@ -74,7 +74,7 @@ FILE: exhaustiveness_enum.kt
|
||||
}
|
||||
}
|
||||
|
||||
lval a: R|kotlin/Int| = when (R|<local>/e|) {
|
||||
lval b: R|kotlin/Int| = when (R|<local>/e|) {
|
||||
==($subj$, Q|Enum|.R|/Enum.A|) -> {
|
||||
Int(1)
|
||||
}
|
||||
@@ -89,7 +89,7 @@ FILE: exhaustiveness_enum.kt
|
||||
}
|
||||
}
|
||||
|
||||
lval a: R|kotlin/Int| = when (R|<local>/e|) {
|
||||
lval c: R|kotlin/Int| = when (R|<local>/e|) {
|
||||
==($subj$, Q|Enum|.R|/Enum.A|) -> {
|
||||
Int(1)
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -33,14 +33,14 @@ fun test_2(e: Enum?) {
|
||||
Enum.C -> 3
|
||||
}
|
||||
|
||||
val a = when (e) {
|
||||
val b = when (e) {
|
||||
Enum.A -> 1
|
||||
Enum.B -> 2
|
||||
Enum.C -> 3
|
||||
null -> 4
|
||||
}
|
||||
|
||||
val a = when (e) {
|
||||
val c = when (e) {
|
||||
Enum.A -> 1
|
||||
Enum.B -> 2
|
||||
Enum.C -> 3
|
||||
|
||||
compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveness_enumJava.fir.txt
Vendored
+2
-2
@@ -56,7 +56,7 @@ FILE: main.kt
|
||||
}
|
||||
}
|
||||
.<Unresolved name: plus>#(Int(0))
|
||||
lval a: R|kotlin/Int| = when (R|<local>/e|) {
|
||||
lval b: R|kotlin/Int| = when (R|<local>/e|) {
|
||||
==($subj$, Q|JavaEnum|.R|/JavaEnum.A|) -> {
|
||||
Int(1)
|
||||
}
|
||||
@@ -71,7 +71,7 @@ FILE: main.kt
|
||||
}
|
||||
}
|
||||
.R|kotlin/Int.plus|(Int(0))
|
||||
lval a: R|kotlin/Int| = when (R|<local>/e|) {
|
||||
lval c: R|kotlin/Int| = when (R|<local>/e|) {
|
||||
==($subj$, Q|JavaEnum|.R|/JavaEnum.A|) -> {
|
||||
Int(1)
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -37,14 +37,14 @@ fun test_2(e: JavaEnum?) {
|
||||
JavaEnum.C -> 3
|
||||
}.<!UNRESOLVED_REFERENCE!>plus<!>(0)
|
||||
|
||||
val a = when (e) {
|
||||
val b = when (e) {
|
||||
JavaEnum.A -> 1
|
||||
JavaEnum.B -> 2
|
||||
JavaEnum.C -> 3
|
||||
null -> 4
|
||||
}.plus(0)
|
||||
|
||||
val a = when (e) {
|
||||
val c = when (e) {
|
||||
JavaEnum.A -> 1
|
||||
JavaEnum.B -> 2
|
||||
JavaEnum.C -> 3
|
||||
|
||||
Reference in New Issue
Block a user