Fix compilation on mixed hierarchies in compatibility mode
This commit is contained in:
compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
// FILE: 1.kt
|
||||
// !JVM_DEFAULT_MODE: disable
|
||||
|
||||
interface Foo<T> {
|
||||
fun test(p: T) = "fail"
|
||||
val T.prop: String
|
||||
get() = "fail"
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// JVM_TARGET: 1.8
|
||||
interface Foo2: Foo<String> {
|
||||
override fun test(p: String) : String = p
|
||||
|
||||
override val String.prop: String
|
||||
get() = this
|
||||
}
|
||||
|
||||
interface Foo3: Foo<String>, Foo2
|
||||
|
||||
class Base : Foo3
|
||||
|
||||
fun box(): String {
|
||||
val base = Base()
|
||||
return base.test("O") + with(base) { "K".prop }
|
||||
}
|
||||
Reference in New Issue
Block a user