KT-156 Fix the this<Super> syntax

This commit is contained in:
Andrey Breslav
2011-10-20 18:00:19 +04:00
parent 7bb7ea912e
commit e91d20f326
7 changed files with 68 additions and 8 deletions
@@ -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
}
}
+10
View File
@@ -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
}
}