Tests moved to appropriate locations
This commit is contained in:
@@ -72,6 +72,6 @@ class ERROR<E>() : <!UNRESOLVED_REFERENCE!>UR<!> {
|
||||
// No supertype at all
|
||||
class A1 {
|
||||
fun test() {
|
||||
super.equals(null)
|
||||
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!>.equals(null)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// KT-156 Fix the this<Super> syntax
|
||||
fun foo() {
|
||||
super.foo();
|
||||
super<Int>.foo();
|
||||
super<>.foo();
|
||||
super<Int>@label.foo();
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
JetFile: Super.jet
|
||||
PsiComment(EOL_COMMENT)('// KT-156 Fix the this<Super> syntax')
|
||||
PsiWhiteSpace('\n')
|
||||
NAMESPACE
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
SUPER_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(super)('super')
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n ')
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
SUPER_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(super)('super')
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n ')
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
SUPER_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(super)('super')
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
PsiErrorElement:Type expected
|
||||
<empty list>
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n ')
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
SUPER_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(super)('super')
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiElement(GT)('>')
|
||||
LABEL_QUALIFIER
|
||||
LABEL_REFERENCE
|
||||
PsiElement(LABEL_IDENTIFIER)('@label')
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,36 @@
|
||||
~T~trait T {
|
||||
fun foo() {}
|
||||
}
|
||||
~C~open class C() {
|
||||
fun bar() {}
|
||||
}
|
||||
|
||||
~A~class A<E>() : C(), T {
|
||||
|
||||
fun test() {
|
||||
`T`super<T>.foo()
|
||||
`C`super<C>.bar()
|
||||
`T`super<T>@A.foo()
|
||||
`C`super<C>@A.bar()
|
||||
}
|
||||
|
||||
class B : T {
|
||||
fun test() {
|
||||
`T`super<T>.foo();
|
||||
`C`super<C>@A.bar()
|
||||
`T`super<T>@A.foo()
|
||||
`T`super<T>@B.foo()
|
||||
`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