Add BB test for problem fixed with c2ab91d0
This commit is contained in:
committed by
teamcityserver
parent
1481ad21f5
commit
0058d7e3d6
@@ -0,0 +1,21 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// MODULE: m1
|
||||
// FILE: E.java
|
||||
public enum E {
|
||||
OK();
|
||||
public static E valueOf(int x) {
|
||||
if (x == 0) return OK;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// MODULE: m2(m1)
|
||||
// FILE: test.kt
|
||||
|
||||
fun box(): String {
|
||||
return doIt(E.valueOf(0))
|
||||
}
|
||||
|
||||
fun doIt(e: E) = when (e) {
|
||||
E.OK -> "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user