[FIR] Support several super-related diagnostics
This commit is contained in:
@@ -19,10 +19,10 @@ class A<E>() : C(), T {
|
||||
super<C>@A.bar()
|
||||
super<E>.<!UNRESOLVED_REFERENCE!>bar<!>()
|
||||
super<E>@A.<!UNRESOLVED_REFERENCE!>bar<!>()
|
||||
super<Int>.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
<!NOT_A_SUPERTYPE!>super<Int><!>.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
super<<!SYNTAX!><!>>.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
super<() -> Unit>.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
super<Unit>.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
<!NOT_A_SUPERTYPE!>super<() -> Unit><!>.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
<!NOT_A_SUPERTYPE!>super<Unit><!>.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
super<T>@B.foo()
|
||||
super<C>@B.bar()
|
||||
}
|
||||
@@ -30,11 +30,11 @@ class A<E>() : C(), T {
|
||||
inner class B : T {
|
||||
fun test() {
|
||||
super<T>.foo();
|
||||
super<C>.bar()
|
||||
super<C>@A.bar()
|
||||
<!NOT_A_SUPERTYPE!>super<C><!>.bar()
|
||||
<!NOT_A_SUPERTYPE!>super<C>@A<!>.bar()
|
||||
super<T>@A.foo()
|
||||
super<T>@B.foo()
|
||||
super<C>@B.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
<!NOT_A_SUPERTYPE!>super<C>@B<!>.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
super.foo()
|
||||
super
|
||||
super<T>
|
||||
|
||||
+1
-1
@@ -5,6 +5,6 @@ open class A {
|
||||
interface ATrait : A {
|
||||
|
||||
override fun foo() {
|
||||
super<A>.foo()
|
||||
<!SUPERCLASS_NOT_ACCESSIBLE_FROM_INTERFACE!>super<A><!>.foo()
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
fun String.f() {
|
||||
<!NO_SUPERTYPE, NO_SUPERTYPE!>super@f<!>.<!UNRESOLVED_REFERENCE!>compareTo<!>("")
|
||||
<!NO_SUPERTYPE, NO_SUPERTYPE!>super<!>.<!UNRESOLVED_REFERENCE!>compareTo<!>("")
|
||||
<!NO_SUPERTYPE, NO_SUPERTYPE, SUPER_NOT_AVAILABLE!>super@f<!>.<!UNRESOLVED_REFERENCE!>compareTo<!>("")
|
||||
<!NO_SUPERTYPE, NO_SUPERTYPE, SUPER_NOT_AVAILABLE!>super<!>.<!UNRESOLVED_REFERENCE!>compareTo<!>("")
|
||||
}
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
fun foo() {
|
||||
<!NO_SUPERTYPE, NO_SUPERTYPE!>super<!>
|
||||
<!NO_SUPERTYPE, NO_SUPERTYPE!>super<!>.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
super<Nothing>.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
<!NO_SUPERTYPE, NO_SUPERTYPE, SUPER_NOT_AVAILABLE!>super<!>
|
||||
<!NO_SUPERTYPE, NO_SUPERTYPE, SUPER_NOT_AVAILABLE!>super<!>.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
<!SUPER_NOT_AVAILABLE!>super<Nothing><!>.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
}
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
fun any(a : Any) {}
|
||||
|
||||
fun notAnExpression() {
|
||||
any(<!NO_SUPERTYPE, NO_SUPERTYPE!>super<!>) // not an expression
|
||||
if (<!NO_SUPERTYPE, NO_SUPERTYPE!>super<!>) {} else {} // not an expression
|
||||
val x = <!NO_SUPERTYPE, NO_SUPERTYPE, NO_SUPERTYPE!>super<!> // not an expression
|
||||
any(<!NO_SUPERTYPE, NO_SUPERTYPE, SUPER_NOT_AVAILABLE!>super<!>) // not an expression
|
||||
if (<!NO_SUPERTYPE, NO_SUPERTYPE, SUPER_NOT_AVAILABLE!>super<!>) {} else {} // not an expression
|
||||
val x = <!NO_SUPERTYPE, NO_SUPERTYPE, NO_SUPERTYPE, SUPER_NOT_AVAILABLE!>super<!> // not an expression
|
||||
when (1) {
|
||||
<!NO_SUPERTYPE, NO_SUPERTYPE!>super<!> -> 1 // not an expression
|
||||
<!NO_SUPERTYPE, NO_SUPERTYPE, SUPER_NOT_AVAILABLE!>super<!> -> 1 // not an expression
|
||||
else -> {}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ class TestSuperForBase : B() {
|
||||
typealias MyBase = B
|
||||
|
||||
override fun foo() {
|
||||
super<Base>.foo()
|
||||
<!NOT_A_SUPERTYPE!>super<Base><!>.foo()
|
||||
super<B>.foo()
|
||||
super<MyBase>.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
super<U>.foo()
|
||||
@@ -32,7 +32,7 @@ class TestSuperForGenericBase<T> : GB<T>() {
|
||||
typealias MyBaseInt = GB<Int>
|
||||
|
||||
override fun foo() {
|
||||
super<GenericBase>.foo()
|
||||
<!NOT_A_SUPERTYPE!>super<GenericBase><!>.foo()
|
||||
super<GB>.foo()
|
||||
super<MyBase>.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
super<MyBaseInt>.<!UNRESOLVED_REFERENCE!>foo<!>() // Type arguments don't matter here
|
||||
|
||||
Reference in New Issue
Block a user