Add new tests
This commit is contained in:
committed by
Mikhail Bogdanov
parent
0570c05683
commit
0c0bd67a6b
+19
@@ -0,0 +1,19 @@
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// JVM_TARGET: 1.8
|
||||
// FULL_JDK
|
||||
|
||||
interface KInterface {
|
||||
|
||||
fun test(s: String ="OK"): String {
|
||||
return s
|
||||
}
|
||||
}
|
||||
|
||||
// 1 INVOKESTATIC KInterface.access\$test\$jd
|
||||
// 1 INVOKESTATIC KInterface.test\$default
|
||||
|
||||
// from $default
|
||||
// 1 INVOKEINTERFACE KInterface.test
|
||||
|
||||
//from $jd
|
||||
// 1 INVOKESPECIAL KInterface.test
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
interface A {
|
||||
|
||||
fun foo() = "FAIL"
|
||||
}
|
||||
|
||||
interface Left : A { }
|
||||
interface Right : A {
|
||||
|
||||
override fun foo() = "OK"
|
||||
}
|
||||
|
||||
interface C : Left, Right {}
|
||||
|
||||
fun box(): String {
|
||||
val x = object : C {}
|
||||
return x.foo()
|
||||
}
|
||||
|
||||
// 0 INVOKESTATIC .*\$DefaultImpls\.foo
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
interface KInterface {
|
||||
fun test2(): String {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
interface KInterface2 : KInterface {
|
||||
|
||||
}
|
||||
|
||||
// 1 INVOKESTATIC KInterface2.access\$test2\$jd
|
||||
// 1 INVOKESTATIC KInterface.access\$test2\$jd
|
||||
|
||||
// 1 INVOKESPECIAL KInterface2.test2
|
||||
// 1 INVOKESPECIAL KInterface.test2
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
interface KInterface {
|
||||
fun test2(): String {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
interface KInterface2 : KInterface {
|
||||
abstract override fun test2(): String
|
||||
}
|
||||
|
||||
// 1 INVOKESTATIC KInterface.access\$test2\$jd
|
||||
// +
|
||||
// 0 INVOKESTATIC KInterface2.access\$test2\$jd
|
||||
// =
|
||||
// 1 INVOKESTATIC KInterface
|
||||
|
||||
// 1 INVOKESPECIAL KInterface.test2
|
||||
// 0 INVOKESPECIAL KInterface2.test2
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
interface KInterface {
|
||||
|
||||
var bar: String
|
||||
get() = "OK"
|
||||
set(field) {}
|
||||
}
|
||||
|
||||
interface KInterface2 : KInterface {
|
||||
|
||||
}
|
||||
|
||||
// 1 INVOKESTATIC KInterface2.access\$getBar\$jd
|
||||
// 1 INVOKESTATIC KInterface2.access\$setBar\$jd
|
||||
// 1 INVOKESTATIC KInterface.access\$getBar\$jd
|
||||
// 1 INVOKESTATIC KInterface.access\$setBar\$jd
|
||||
|
||||
// 1 INVOKESPECIAL KInterface2.getBar
|
||||
// 1 INVOKESPECIAL KInterface2.setBar
|
||||
// 1 INVOKESPECIAL KInterface.getBar
|
||||
// 1 INVOKESPECIAL KInterface.setBar
|
||||
Reference in New Issue
Block a user