Files
kotlin-fork/compiler/testData/diagnostics/tests/override/FakeOverrideModality1.kt
T
Alexander Udalov b72293883d Fix algorithm of determining modality for fake overrides
Previously we inferred "open" if there was at least one open member in the
hierarchy. However, that's not correct when that member is overridden by
another member in the hierarchy which is abstract. This led to incorrect code
being accepted by the front-end, and an exception during the bridge generation

 #KT-12467 Fixed
2016-07-26 21:16:15 +03:00

15 lines
222 B
Kotlin
Vendored

interface A {
fun foo() {}
}
interface B : A {
abstract override fun foo()
}
interface C {
abstract fun foo()
}
// Fake override Z#foo should be abstract
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>class Z<!> : B, C