Added parser test for function with initializer.
This commit is contained in:
@@ -20,3 +20,4 @@ fun [a()] T.foo<T : [a] (a) -> b>(a : foo) : bar {}
|
|||||||
|
|
||||||
fun A?.foo() : bar?
|
fun A?.foo() : bar?
|
||||||
fun A? .foo() : bar?
|
fun A? .foo() : bar?
|
||||||
|
fun foo() = 5
|
||||||
@@ -623,3 +623,16 @@ JetFile: Functions.kt
|
|||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('bar')
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiElement(QUEST)('?')
|
PsiElement(QUEST)('?')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(EQ)('=')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('5')
|
||||||
@@ -6,3 +6,4 @@ fun [a()] T.foo<, T, , T>(a : foo) : bar
|
|||||||
fun [a()] T.foo<T, T>(, a : foo, , a: b) : bar
|
fun [a()] T.foo<T, T>(, a : foo, , a: b) : bar
|
||||||
|
|
||||||
fun foo() : = a;
|
fun foo() : = a;
|
||||||
|
fun foo() = ;
|
||||||
@@ -291,3 +291,17 @@ JetFile: Functions_ERR.kt
|
|||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('a')
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(SEMICOLON)(';')
|
PsiElement(SEMICOLON)(';')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(EQ)('=')
|
||||||
|
PsiErrorElement:Expecting an expression
|
||||||
|
<empty list>
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(SEMICOLON)(';')
|
||||||
Reference in New Issue
Block a user