Generate descriptor for trait constructor. Exception is thrown otherwise (EA-38416)

This commit is contained in:
Nikolay Krasko
2015-03-10 20:52:46 +03:00
parent 38809761e2
commit 6ba120bba8
7 changed files with 121 additions and 23 deletions
@@ -0,0 +1,2 @@
trait TestTrait(val a: Int, var b: String, c: Double)
trait TestTrait()
@@ -0,0 +1,50 @@
JetFile: TraitConstructor.kt
PACKAGE_DIRECTIVE
<empty list>
CLASS
PsiElement(trait)('trait')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('TestTrait')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('a')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
VALUE_PARAMETER
PsiElement(var)('var')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('b')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('String')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('c')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Double')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n')
CLASS
PsiElement(trait)('trait')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('TestTrait')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')