Report error on missed specialization in compatibility mode
#KT-39603 Fixed
This commit is contained in:
@@ -9,6 +9,7 @@ interface Z<T> {
|
||||
}
|
||||
}
|
||||
|
||||
@JvmDefaultWithoutCompatibility
|
||||
open class ZImpl : Z<String>
|
||||
|
||||
class ZImpl2 : ZImpl() {
|
||||
|
||||
@@ -9,8 +9,11 @@ interface Z<T> {
|
||||
}
|
||||
}
|
||||
|
||||
@JvmDefaultWithoutCompatibility
|
||||
open class ZImpl : Z<String>
|
||||
|
||||
//TODO: this is redundant, revise diagnostic
|
||||
@JvmDefaultWithoutCompatibility
|
||||
open class ZImpl2 : Z<String>, ZImpl()
|
||||
|
||||
class ZImpl3 : ZImpl2() {
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// JVM_TARGET: 1.8
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
interface Foo<T> {
|
||||
fun test(p: T) = p
|
||||
val T.prop: T
|
||||
get() = this
|
||||
}
|
||||
|
||||
open class BaseSpecialized : Foo<String> {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val base = BaseSpecialized()
|
||||
return base.test("O") + with(base) { "K".prop }
|
||||
}
|
||||
Reference in New Issue
Block a user