[FIR] Support diagnostic SUPER_IS_NOT_AN_EXPRESSION

This commit is contained in:
Nick
2020-03-16 22:58:12 +03:00
committed by Mikhail Glukhikh
parent ca22e05acd
commit abcd6bd528
10 changed files with 93 additions and 20 deletions
@@ -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')
}
}
}
@@ -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'))
}
)
}
}