Fix exception when type parameters appear in object declaration
#KT-14536 Fixed
This commit is contained in:
@@ -7,16 +7,15 @@ JetFile: Everything.kt
|
||||
PsiElement(object)('object')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
PsiErrorElement:Type parameters are not allowed for objects
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('R')
|
||||
PsiElement(GT)('>')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('R')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PRIMARY_CONSTRUCTOR
|
||||
MODIFIER_LIST
|
||||
|
||||
+27
-30
@@ -7,16 +7,15 @@ JetFile: TypeParametersAndParentheses.kt
|
||||
PsiElement(object)('object')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
PsiErrorElement:Type parameters are not allowed for objects
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('R')
|
||||
PsiElement(GT)('>')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('R')
|
||||
PsiElement(GT)('>')
|
||||
PRIMARY_CONSTRUCTOR
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
@@ -26,16 +25,15 @@ JetFile: TypeParametersAndParentheses.kt
|
||||
PsiElement(object)('object')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
PsiErrorElement:Type parameters are not allowed for objects
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('R')
|
||||
PsiElement(GT)('>')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('R')
|
||||
PsiElement(GT)('>')
|
||||
PRIMARY_CONSTRUCTOR
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
@@ -57,16 +55,15 @@ JetFile: TypeParametersAndParentheses.kt
|
||||
PsiElement(object)('object')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
PsiErrorElement:Type parameters are not allowed for objects
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('R')
|
||||
PsiElement(GT)('>')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('R')
|
||||
PsiElement(GT)('>')
|
||||
PRIMARY_CONSTRUCTOR
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
|
||||
@@ -7,31 +7,29 @@ JetFile: TypeParameterss.kt
|
||||
PsiElement(object)('object')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
PsiErrorElement:Type parameters are not allowed for objects
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('R')
|
||||
PsiElement(GT)('>')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('R')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace('\n\n')
|
||||
OBJECT_DECLARATION
|
||||
PsiElement(object)('object')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
PsiErrorElement:Type parameters are not allowed for objects
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('R')
|
||||
PsiElement(GT)('>')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('R')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
@@ -41,16 +39,15 @@ JetFile: TypeParameterss.kt
|
||||
PsiElement(object)('object')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
PsiErrorElement:Type parameters are not allowed for objects
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('R')
|
||||
PsiElement(GT)('>')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('R')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
Reference in New Issue
Block a user