Add more tests for type operators on the jvm

This commit is contained in:
Steven Schäfer
2019-05-22 14:42:05 +02:00
committed by max-kammerer
parent b6ea135e70
commit 6bf16a96e1
11 changed files with 99 additions and 5 deletions
@@ -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; }
}