Add new tests

This commit is contained in:
Mikhael Bogdanov
2020-02-04 10:57:33 +01:00
committed by Mikhail Bogdanov
parent 0570c05683
commit 0c0bd67a6b
50 changed files with 1959 additions and 1 deletions
@@ -0,0 +1,23 @@
// !JVM_DEFAULT_MODE: all-compatibility
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// WITH_RUNTIME
// FULL_JDK
interface Test {
fun test(s: String ="OK"): String {
return s
}
}
class TestClass : Test {
}
fun box(): String {
val defaultImpls = java.lang.Class.forName(Test::class.java.canonicalName + "\$DefaultImpls")
val declaredMethod = defaultImpls.getDeclaredMethod("test\$default", Test::class.java, String::class.java, Int::class.java, Any::class.java)
return declaredMethod.invoke(null, TestClass(), null, 1, null) as String
}