Refactoring. Moved error checks (for abstract, super)
to CandidateResolver Added error SUPER_CANT_BE_EXTENSION_RECEIVER (it was SUPER_IS_NOT_AN_EXPRESSION)
This commit is contained in:
@@ -25,6 +25,6 @@ abstract class D(): A() {
|
||||
super.<!ABSTRACT_SUPER_CALL!>i<!>
|
||||
|
||||
super.fff() //everything is ok
|
||||
return super.<!ABSTRACT_SUPER_CALL!>foo()<!> //no error!!
|
||||
return super.<!ABSTRACT_SUPER_CALL!>foo<!>() //no error!!
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ class C : T {
|
||||
fun T.buzz() {}
|
||||
fun T.buzz1() {}
|
||||
super.foo() // OK
|
||||
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!>.bar() // Error
|
||||
<!SUPER_CANT_BE_EXTENSION_RECEIVER!>super<!>.bar() // Error
|
||||
super.buzz() // OK, resolved to a member
|
||||
super.buzz1(<!NO_VALUE_FOR_PARAMETER!>)<!> // Resolved to a member, but error: no parameter passed where required
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// No supertype at all
|
||||
class A1 {
|
||||
fun test() {
|
||||
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!>.identityEquals(null) // Call to an extension function
|
||||
<!SUPER_CANT_BE_EXTENSION_RECEIVER!>super<!>.identityEquals(null) // Call to an extension function
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user