KT-156 Fix the this<Super> syntax
This commit is contained in:
@@ -46,4 +46,17 @@ fun foo() {
|
||||
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!>
|
||||
super.foo()
|
||||
super<Nothing>.foo()
|
||||
}
|
||||
}
|
||||
|
||||
trait G<T> {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
class CG : G<Int> {
|
||||
fun test() {
|
||||
super<G>.foo() // OK
|
||||
super<G<!TYPE_ARGUMENTS_REDUNDANT_IN_SUPER_QUALIFIER!><Int><!>>.foo() // Warning
|
||||
super<<!NOT_A_SUPERTYPE!>G<<!UNRESOLVED_REFERENCE!>E<!>><!>>.foo() // Error
|
||||
super<<!NOT_A_SUPERTYPE!>G<String><!>>.foo() // Error
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,4 +23,14 @@
|
||||
`T`super.foo()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
~G~trait G<T> {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
class CG : G<Int> {
|
||||
fun test() {
|
||||
`G`super<`G`G>.foo() // OK
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user