Add more tests for type operators on the jvm
This commit is contained in:
committed by
max-kammerer
parent
b6ea135e70
commit
6bf16a96e1
+20
@@ -0,0 +1,20 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// FILE: test.kt
|
||||
fun f(x: String) = "Fail 1"
|
||||
|
||||
fun box(): String {
|
||||
return try {
|
||||
f(J.s())
|
||||
} catch (e: IllegalStateException) {
|
||||
if (e.message == "J.s() must not be null")
|
||||
"OK"
|
||||
else
|
||||
"Fail: ${e.message}"
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
public class J {
|
||||
public static String s() { return null; }
|
||||
}
|
||||
Reference in New Issue
Block a user