[FIR] Support diagnostic ABSTRACT_SUPER_CALL
This commit is contained in:
+41
@@ -0,0 +1,41 @@
|
||||
open class C {
|
||||
open val x: Int = 10
|
||||
fun h() {}
|
||||
}
|
||||
|
||||
abstract class A : C() {
|
||||
override val x: Int = 20
|
||||
|
||||
abstract val y: Int
|
||||
|
||||
abstract fun f()
|
||||
|
||||
fun t() {
|
||||
super.h()
|
||||
super.x
|
||||
}
|
||||
}
|
||||
|
||||
class B : A() {
|
||||
override fun f() {
|
||||
|
||||
}
|
||||
|
||||
fun g() {
|
||||
super.<!ABSTRACT_SUPER_CALL!>f<!>()
|
||||
super.t()
|
||||
|
||||
super.x
|
||||
super.<!ABSTRACT_SUPER_CALL!>y<!>
|
||||
}
|
||||
}
|
||||
|
||||
abstract class J : A() {
|
||||
fun r() {
|
||||
super.<!ABSTRACT_SUPER_CALL!>f<!>()
|
||||
super.t()
|
||||
|
||||
super.x
|
||||
super.<!ABSTRACT_SUPER_CALL!>y<!>
|
||||
}
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
FILE: abstractSuperCall.kt
|
||||
public open class C : R|kotlin/Any| {
|
||||
public constructor(): R|C| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public open val x: R|kotlin/Int| = Int(10)
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
public final fun h(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
public abstract class A : R|C| {
|
||||
public constructor(): R|A| {
|
||||
super<R|C|>()
|
||||
}
|
||||
|
||||
public open override val x: R|kotlin/Int| = Int(20)
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
public abstract val y: R|kotlin/Int|
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
public abstract fun f(): R|kotlin/Unit|
|
||||
|
||||
public final fun t(): R|kotlin/Unit| {
|
||||
super<R|C|>.R|/C.h|()
|
||||
super<R|C|>.R|/C.x|
|
||||
}
|
||||
|
||||
}
|
||||
public final class B : R|A| {
|
||||
public constructor(): R|B| {
|
||||
super<R|A|>()
|
||||
}
|
||||
|
||||
public final override fun f(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
public final fun g(): R|kotlin/Unit| {
|
||||
super<R|A|>.R|/A.f|()
|
||||
super<R|A|>.R|/A.t|()
|
||||
super<R|A|>.R|/A.x|
|
||||
super<R|A|>.R|/A.y|
|
||||
}
|
||||
|
||||
}
|
||||
public abstract class J : R|A| {
|
||||
public constructor(): R|J| {
|
||||
super<R|A|>()
|
||||
}
|
||||
|
||||
public final fun r(): R|kotlin/Unit| {
|
||||
super<R|A|>.R|/A.f|()
|
||||
super<R|A|>.R|/A.t|()
|
||||
super<R|A|>.R|/A.x|
|
||||
super<R|A|>.R|/A.y|
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user