Switch warning to error for java-default method calls within 1.6 target

#KT-15825 Fixed

(cherry picked from commit 9b29ebb)
This commit is contained in:
Mikhael Bogdanov
2017-08-04 09:35:15 +02:00
committed by Ilya Gorbunov
parent 5bfa9b248e
commit 232d1bd9ef
7 changed files with 9 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ open class Base {
fun foo() = "OK"
}
@kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET")
class C : Base(), IBase {
val lambda1 = {
super.foo()

View File

@@ -15,6 +15,7 @@ interface KInterface {
}
class Test : Simple {
@kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET")
fun bar(): String {
return super.test()
}

View File

@@ -13,12 +13,14 @@ 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()
}
@@ -27,6 +29,7 @@ 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()
}

View File

@@ -15,6 +15,7 @@ interface K2 : K1
interface K3 : K2
class C : K3 {
@kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET")
override fun foo() = super.foo()
}