Exception fix: more accurate parsing of class base type #EA-65509 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-06-01 19:34:19 +03:00
parent d77c6eb30e
commit e623aadf00
7 changed files with 92 additions and 2 deletions
@@ -0,0 +1,5 @@
// !DIAGNOSTICS: -FUNCTION_DECLARATION_WITH_NO_NAME
class ClassB() {
private inner class ClassC: <!SYNTAX!>super<!><!SYNTAX!>.<!><!UNRESOLVED_REFERENCE!>ClassA<!>()<!SYNTAX!><!> {
}
}
@@ -0,0 +1,16 @@
package
internal final class ClassB {
public constructor ClassB()
[ERROR : ClassA]() internal final fun <no name provided>(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
private final inner class ClassC {
public constructor ClassC()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
+4
View File
@@ -0,0 +1,4 @@
class ClassB() {
class ClassC: super.ClassA() {
}
}
+50
View File
@@ -0,0 +1,50 @@
JetFile: NonTypeBeforeDotInBaseClass.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
CLASS
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('ClassB')
PRIMARY_CONSTRUCTOR
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
CLASS_BODY
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
CLASS
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('ClassC')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
DELEGATION_SPECIFIER_LIST
DELEGATOR_SUPER_CLASS
TYPE_REFERENCE
PsiErrorElement:Type expected
PsiElement(super)('super')
PsiErrorElement:Expecting member declaration
PsiElement(DOT)('.')
FUN
MODIFIER_LIST
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('ClassA')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiErrorElement:Expecting member declaration
<empty list>
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')