Switch DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET according to LL
This commit is contained in:
@@ -7,11 +7,11 @@ interface IBase {
|
||||
}
|
||||
|
||||
// FILE: Kotlin.kt
|
||||
// JVM_TARGET: 1.8
|
||||
open class Base {
|
||||
fun foo() = "OK"
|
||||
}
|
||||
|
||||
@kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET")
|
||||
class C : Base(), IBase {
|
||||
val lambda1 = {
|
||||
super.foo()
|
||||
|
||||
@@ -11,7 +11,7 @@ public interface Simple {
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
// JVM_TARGET: 1.8
|
||||
interface KInterface : Simple {
|
||||
fun bar(): String {
|
||||
return test("O") + Simple.testStatic("O")
|
||||
|
||||
@@ -11,7 +11,7 @@ interface Simple {
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
// JVM_TARGET: 1.8
|
||||
class Test : Simple {}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -11,7 +11,7 @@ public interface Simple {
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
// JVM_TARGET: 1.8
|
||||
interface TestInterface : Simple {}
|
||||
class Test : TestInterface {}
|
||||
|
||||
|
||||
+1
-2
@@ -7,7 +7,7 @@ interface Simple extends KInterface {
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
// JVM_TARGET: 1.8
|
||||
interface KInterface {
|
||||
fun test(): String {
|
||||
return "base";
|
||||
@@ -15,7 +15,6 @@ interface KInterface {
|
||||
}
|
||||
|
||||
class Test : Simple {
|
||||
@kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET")
|
||||
fun bar(): String {
|
||||
return super.test()
|
||||
}
|
||||
|
||||
@@ -7,20 +7,18 @@ public interface Test {
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
// JVM_TARGET: 1.8
|
||||
interface KInterface : Test {
|
||||
|
||||
}
|
||||
|
||||
class KClass : Test {
|
||||
@kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET")
|
||||
fun ktest(): String {
|
||||
return super.test() + test()
|
||||
}
|
||||
}
|
||||
|
||||
class KTClass : KInterface {
|
||||
@kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET")
|
||||
fun ktest(): String {
|
||||
return super.test() + test()
|
||||
}
|
||||
@@ -29,7 +27,6 @@ class KTClass : KInterface {
|
||||
|
||||
fun box(): String {
|
||||
val p = object : KInterface {
|
||||
@kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET")
|
||||
fun ktest(): String {
|
||||
return super.test() + test()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
// FILE: Test.java
|
||||
|
||||
public interface Test {
|
||||
default String test() {
|
||||
return "OK";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
interface KInterface : Test {
|
||||
|
||||
}
|
||||
|
||||
class KClass : Test {
|
||||
@kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET_ERROR")
|
||||
fun ktest(): String {
|
||||
return super.test() + test()
|
||||
}
|
||||
}
|
||||
|
||||
class KTClass : KInterface {
|
||||
@kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET_ERROR")
|
||||
fun ktest(): String {
|
||||
return super.test() + test()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
val p = object : KInterface {
|
||||
@kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET_ERROR")
|
||||
fun ktest(): String {
|
||||
return super.test() + test()
|
||||
}
|
||||
}.ktest()
|
||||
|
||||
if (p != "OKOK") return "fail1: $p"
|
||||
|
||||
if (KClass().ktest() != "OKOK") return "fail 2: ${KClass().ktest()}"
|
||||
|
||||
if (KTClass().ktest() != "OKOK") return "fail 3: ${KTClass().ktest()}"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+1
-2
@@ -7,7 +7,7 @@ public interface Base {
|
||||
}
|
||||
|
||||
// FILE: derived.kt
|
||||
|
||||
// JVM_TARGET: 1.8
|
||||
interface K1 : Base
|
||||
|
||||
interface K2 : K1
|
||||
@@ -15,7 +15,6 @@ interface K2 : K1
|
||||
interface K3 : K2
|
||||
|
||||
class C : K3 {
|
||||
@kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET")
|
||||
override fun foo() = super.foo()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// FULL_JDK
|
||||
// WITH_RUNTIME
|
||||
// LANGUAGE_VERSION: 1.1
|
||||
import java.util.stream.*
|
||||
|
||||
class B<F> : List<F> {
|
||||
|
||||
Reference in New Issue
Block a user