JET-172 Allow many parameters of a function literals to be declared without parentheses
This commit is contained in:
@@ -26,4 +26,5 @@ fun foo() {
|
|||||||
{T.(a) : T => a}
|
{T.(a) : T => a}
|
||||||
|
|
||||||
{x, y => 1}
|
{x, y => 1}
|
||||||
|
{[a] x, [b] y, [c] z => 1}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -453,5 +453,57 @@ JetFile: FunctionLiterals.jet
|
|||||||
INTEGER_CONSTANT
|
INTEGER_CONSTANT
|
||||||
PsiElement(INTEGER_LITERAL)('1')
|
PsiElement(INTEGER_LITERAL)('1')
|
||||||
PsiElement(RBRACE)('}')
|
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')
|
PsiWhiteSpace('\n')
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
Reference in New Issue
Block a user