Move JVM8 box test to common
This commit is contained in:
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
// !API_VERSION: 1.3
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun test() {
|
||||
}
|
||||
}
|
||||
|
||||
class TestClass : Test {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
TestClass::class.java.getDeclaredMethod("test")
|
||||
}
|
||||
catch (e: NoSuchMethodException) {
|
||||
return "OK"
|
||||
}
|
||||
return "fail"
|
||||
}
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
// !API_VERSION: 1.3
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun test() {
|
||||
}
|
||||
}
|
||||
|
||||
interface Test2 : Test {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
Test2::class.java.getDeclaredMethod("test")
|
||||
}
|
||||
catch (e: NoSuchMethodException) {
|
||||
return "OK"
|
||||
}
|
||||
return "fail"
|
||||
}
|
||||
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
// !API_VERSION: 1.3
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun test() {
|
||||
}
|
||||
}
|
||||
|
||||
interface Test2 : Test {
|
||||
|
||||
}
|
||||
|
||||
interface Test3 : Test2 {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
Test3::class.java.getDeclaredMethod("test")
|
||||
}
|
||||
catch (e: NoSuchMethodException) {
|
||||
return "OK"
|
||||
}
|
||||
return "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user