Generate descriptor for trait constructor. Exception is thrown otherwise...

EA-38416, EA-65189, EA-60850
This commit is contained in:
Nikolay Krasko
2015-03-16 01:33:08 +03:00
parent 6fb5dacde4
commit 8c5109d819
7 changed files with 132 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)(')')