JVM_IR box tests for JDK9

This commit is contained in:
Dmitry Petrov
2020-12-22 11:43:04 +03:00
parent c9d330207b
commit 796d821776
5 changed files with 108 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
// TARGET_BACKEND: JVM
// WITH_RUNTIME
fun box(): String {
val f = {}
val sam = Runnable(f)
val samJavaClass = sam::class.java
if (samJavaClass.simpleName != "")
throw Exception("samJavaClass.simpleName='${samJavaClass.simpleName}'")
if (!samJavaClass.isAnonymousClass())
throw Exception("!samJavaClass.isAnonymousClass(): '${samJavaClass.name}'")
return "OK"
}