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.
This commit is contained in:
Mikhael Bogdanov
2018-04-10 12:13:24 +02:00
parent e23c406285
commit 56d1184515
10 changed files with 148 additions and 24 deletions
@@ -14,6 +14,23 @@ interface <!JVM_DEFAULT_THROUGH_INHERITANCE!>B<!> : A {
open class <!JVM_DEFAULT_THROUGH_INHERITANCE!>Foo<!> : B
open class <!JVM_DEFAULT_THROUGH_INHERITANCE!>Foo2<!> : B, A
open class FooNoError : B {
override fun test() {
}
}
open class Foo2NoError : B, A {
override fun test() {
}
}
class Bar : Foo()
class <!JVM_DEFAULT_THROUGH_INHERITANCE!>Bar2<!> : Foo(), A
class <!JVM_DEFAULT_THROUGH_INHERITANCE!>Bar3<!> : Foo(), B
class Bar2 : Foo(), A
class Bar3 : Foo(), B
open class BarWithJvmDefault : B {
<!JVM_DEFAULT_NOT_IN_INTERFACE!>@JvmDefault<!>
override fun test() {
}
}
class BarWithJvmDefaultSuper: BarWithJvmDefault()