KT-7377 Throwable: Empty PSI elements should not be passed to createDescriptor from UnusedReceiverParameterInspection

#KT-7377 fixed
This commit is contained in:
Evgeny Gerashchenko
2015-04-09 19:20:15 +03:00
parent e3bdc18aea
commit 508c7a58b6
5 changed files with 83 additions and 1 deletions
+11
View File
@@ -0,0 +1,11 @@
class Clazz {
val
}
fun f() {
a.b()
}
class Clazz {
val
}
@@ -0,0 +1,56 @@
JetFile: BareVal.kt
PACKAGE_DIRECTIVE
<empty list>
CLASS
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('Clazz')
PsiWhiteSpace(' ')
CLASS_BODY
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiErrorElement:Expecting property name or receiver type
<empty list>
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('f')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
DOT_QUALIFIED_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
PsiElement(DOT)('.')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
CLASS
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('Clazz')
PsiWhiteSpace(' ')
CLASS_BODY
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiErrorElement:Expecting property name or receiver type
<empty list>
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')