A bug with single-parameter closures without type annotations fixed

This commit is contained in:
Andrey Breslav
2011-06-02 06:26:33 +04:00
parent 13808dcf9b
commit 826936785a
6 changed files with 37 additions and 24 deletions
+3 -2
View File
@@ -26,8 +26,9 @@ JetFile: FunctionLiterals.jet
PsiWhiteSpace('\n\n ')
FUNCTION_LITERAL
PsiElement(LBRACE)('{')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('a')
VALUE_PARAMETER_LIST
VALUE_PARAMETER
PsiElement(IDENTIFIER)('a')
PsiWhiteSpace(' ')
PsiElement(DOUBLE_ARROW)('=>')
PsiWhiteSpace(' ')
+18 -15
View File
@@ -14,9 +14,10 @@ JetFile: FunctionLiterals_ERR.jet
FUNCTION_LITERAL
PsiElement(LBRACE)('{')
PsiWhiteSpace(' ')
VALUE_PARAMETER
PsiErrorElement:Expecting parameter name
<empty list>
VALUE_PARAMETER_LIST
VALUE_PARAMETER
PsiErrorElement:Expecting parameter name
<empty list>
PsiElement(DOUBLE_ARROW)('=>')
PsiWhiteSpace(' ')
BODY
@@ -26,12 +27,13 @@ JetFile: FunctionLiterals_ERR.jet
PsiWhiteSpace('\n ')
FUNCTION_LITERAL
PsiElement(LBRACE)('{')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('a')
PsiErrorElement:To specify many parameters, use the full notation: {(p1, p2, ...) => ...}
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('b')
VALUE_PARAMETER_LIST
VALUE_PARAMETER
PsiElement(IDENTIFIER)('a')
PsiErrorElement:To specify many parameters, use the full notation: {(p1, p2, ...) => ...}
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('b')
PsiWhiteSpace(' ')
PsiElement(DOUBLE_ARROW)('=>')
PsiWhiteSpace(' ')
@@ -275,13 +277,14 @@ JetFile: FunctionLiterals_ERR.jet
PsiWhiteSpace('\n\n ')
FUNCTION_LITERAL
PsiElement(LBRACE)('{')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('a')
PsiWhiteSpace(' ')
PsiErrorElement:To specify a type of a parameter or a return type, use the full notation: {(parameter : Type) : ReturnType => ...}
PsiElement(COLON)(':')
VALUE_PARAMETER_LIST
VALUE_PARAMETER
PsiElement(IDENTIFIER)('a')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('b')
PsiErrorElement:To specify a type of a parameter or a return type, use the full notation: {(parameter : Type) : ReturnType => ...}
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('b')
PsiWhiteSpace(' ')
PsiElement(DOUBLE_ARROW)('=>')
PsiWhiteSpace(' ')
@@ -600,8 +600,9 @@ JetFile: FunctionsAndTypes.jet
PsiWhiteSpace(' ')
FUNCTION_LITERAL
PsiElement(LBRACE)('{')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('t')
VALUE_PARAMETER_LIST
VALUE_PARAMETER
PsiElement(IDENTIFIER)('t')
PsiWhiteSpace(' ')
PsiElement(DOUBLE_ARROW)('=>')
PsiWhiteSpace(' ')
+3 -2
View File
@@ -944,8 +944,9 @@ JetFile: Graph.jet
FUNCTION_LITERAL
PsiElement(LBRACE)('{')
PsiWhiteSpace(' ')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('n')
VALUE_PARAMETER_LIST
VALUE_PARAMETER
PsiElement(IDENTIFIER)('n')
PsiWhiteSpace(' ')
PsiElement(DOUBLE_ARROW)('=>')
PsiWhiteSpace('\n ')