From a744c183c4d5201a28e0b0d2931c75febf599743 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Wed, 6 Jul 2011 20:30:28 +0400 Subject: [PATCH] JET-172 Allow many parameters of a function literals to be declared without parentheses --- idea/testData/psi/FunctionLiterals.jet | 1 + idea/testData/psi/FunctionLiterals.txt | 52 ++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/idea/testData/psi/FunctionLiterals.jet b/idea/testData/psi/FunctionLiterals.jet index ec6e34c6aa5..6fb663e9924 100644 --- a/idea/testData/psi/FunctionLiterals.jet +++ b/idea/testData/psi/FunctionLiterals.jet @@ -26,4 +26,5 @@ fun foo() { {T.(a) : T => a} {x, y => 1} + {[a] x, [b] y, [c] z => 1} } diff --git a/idea/testData/psi/FunctionLiterals.txt b/idea/testData/psi/FunctionLiterals.txt index 05249115e0b..dbeaa327c51 100644 --- a/idea/testData/psi/FunctionLiterals.txt +++ b/idea/testData/psi/FunctionLiterals.txt @@ -453,5 +453,57 @@ JetFile: FunctionLiterals.jet INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiElement(RBRACE)('}') + PsiWhiteSpace('\n ') + FUNCTION_LITERAL_EXPRESSION + FUNCTION_LITERAL + PsiElement(LBRACE)('{') + VALUE_PARAMETER_LIST + VALUE_PARAMETER + MODIFIER_LIST + ATTRIBUTE_ANNOTATION + PsiElement(LBRACKET)('[') + ATTRIBUTE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiElement(RBRACKET)(']') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('x') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + VALUE_PARAMETER + MODIFIER_LIST + ATTRIBUTE_ANNOTATION + PsiElement(LBRACKET)('[') + ATTRIBUTE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiElement(RBRACKET)(']') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('y') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + VALUE_PARAMETER + MODIFIER_LIST + ATTRIBUTE_ANNOTATION + PsiElement(LBRACKET)('[') + ATTRIBUTE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('c') + PsiElement(RBRACKET)(']') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('z') + PsiWhiteSpace(' ') + PsiElement(DOUBLE_ARROW)('=>') + PsiWhiteSpace(' ') + BLOCK + INTEGER_CONSTANT + PsiElement(INTEGER_LITERAL)('1') + PsiElement(RBRACE)('}') PsiWhiteSpace('\n') PsiElement(RBRACE)('}') \ No newline at end of file