[FIR] Support diagnostic SUPER_IS_NOT_AN_EXPRESSION
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
class A
|
||||
|
||||
class B: A() {
|
||||
fun act() {
|
||||
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!>()
|
||||
|
||||
<!UNRESOLVED_REFERENCE!>invoke<!>()
|
||||
|
||||
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!> {
|
||||
println('weird')
|
||||
}
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
FILE: superIsNotAnExpression.kt
|
||||
public final class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final class B : R|A| {
|
||||
public constructor(): R|B| {
|
||||
super<R|A|>()
|
||||
}
|
||||
|
||||
public final fun act(): R|kotlin/Unit| {
|
||||
<Super cannot be a callee>#()
|
||||
<Unresolved name: invoke>#()
|
||||
<Super cannot be a callee>#(<L> = <Super cannot be a callee>@fun <implicit>.<anonymous>(): <implicit> {
|
||||
println#(ERROR_EXPR(Incorrect character: 'weird'))
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user