Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.kt
T
Mikhael Bogdanov 56d1184515 Restrict conditions for @JvmDefault super calls
Condition was too strict
  if @JvmDefault implicitly hidden by class in inheritance.
  Diagnostic is redundant cause there isn't breaking
  change depending on interface method generation strategy and
  delegating stub generation in inheriting class.
2018-04-10 16:33:26 +02:00

32 lines
530 B
Kotlin
Vendored

// !JVM_TARGET: 1.8
interface A {
<!JVM_DEFAULT_IN_DECLARATION!>@JvmDefault
fun test()<!>
}
interface B{
fun test() {
}
}
<!MANY_INTERFACES_MEMBER_NOT_IMPLEMENTED!>interface AB<!>: A, B
<!MANY_INTERFACES_MEMBER_NOT_IMPLEMENTED!>interface BA<!>: B, A
class C : A, B {
override fun test() {
super<B>.test()
}
}
class D : B, A {
override fun test() {
super<B>.test()
}
}
<!MANY_INTERFACES_MEMBER_NOT_IMPLEMENTED!>class E<!>: B, A {
fun foo() {
super<B>.test()
}
}