diff --git a/compiler/testData/psi/Functions.kt b/compiler/testData/psi/Functions.kt index 86bb4dbce06..ee9fb2d1e90 100644 --- a/compiler/testData/psi/Functions.kt +++ b/compiler/testData/psi/Functions.kt @@ -19,4 +19,5 @@ fun [a()] T.foo b>(a : foo) : bar {} fun [a()] T.foo b>(a : foo) : bar {} fun A?.foo() : bar? -fun A? .foo() : bar? \ No newline at end of file +fun A? .foo() : bar? +fun foo() = 5 \ No newline at end of file diff --git a/compiler/testData/psi/Functions.txt b/compiler/testData/psi/Functions.txt index 4d115b60e14..d8068bd49c9 100644 --- a/compiler/testData/psi/Functions.txt +++ b/compiler/testData/psi/Functions.txt @@ -622,4 +622,17 @@ JetFile: Functions.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('bar') - PsiElement(QUEST)('?') \ No newline at end of file + 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') \ No newline at end of file diff --git a/compiler/testData/psi/Functions_ERR.kt b/compiler/testData/psi/Functions_ERR.kt index ca0dbba2cb1..78c8888e092 100644 --- a/compiler/testData/psi/Functions_ERR.kt +++ b/compiler/testData/psi/Functions_ERR.kt @@ -6,3 +6,4 @@ fun [a()] T.foo<, T, , T>(a : foo) : bar fun [a()] T.foo(, a : foo, , a: b) : bar fun foo() : = a; +fun foo() = ; \ No newline at end of file diff --git a/compiler/testData/psi/Functions_ERR.txt b/compiler/testData/psi/Functions_ERR.txt index 64cf63775f7..e4f24094363 100644 --- a/compiler/testData/psi/Functions_ERR.txt +++ b/compiler/testData/psi/Functions_ERR.txt @@ -290,4 +290,18 @@ JetFile: Functions_ERR.kt PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') + 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 + + PsiWhiteSpace(' ') PsiElement(SEMICOLON)(';') \ No newline at end of file