JVM_IR KT-43242 generate switch subject as primitive 'int'
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: kt43242.kt
|
||||
|
||||
fun fromJson() {
|
||||
test = Bar().fromJson()?.let {
|
||||
when (it) {
|
||||
0 -> false
|
||||
1 -> true
|
||||
else -> true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var test: Any? = "xxx"
|
||||
|
||||
fun box(): String {
|
||||
fromJson()
|
||||
return if (test != null) "Fail: $test" else "OK"
|
||||
}
|
||||
|
||||
// FILE: Bar.java
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class Bar {
|
||||
public final @Nullable Integer fromJson() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user