Skip to content

Commit

Permalink
Merge pull request #1086 from 9rnsr/fix14745
Browse files Browse the repository at this point in the history
Issue 14745 - Qualifiers rejected for delegate literals
  • Loading branch information
MartinNowak committed Sep 2, 2015
2 parents 64d7096 + 82b23ac commit d8330a1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
14 changes: 8 additions & 6 deletions expression.dd
Expand Up @@ -1402,14 +1402,16 @@ $(H4 Function Literals)
$(GRAMMAR
$(GNAME FunctionLiteral):
$(D function) $(GLINK2 declaration, Type)$(OPT) $(GLINK ParameterAttributes) $(OPT) $(GLINK FunctionLiteralBody)
$(D delegate) $(GLINK2 declaration, Type)$(OPT) $(GLINK ParameterAttributes) $(OPT) $(GLINK FunctionLiteralBody)
$(GLINK ParameterAttributes) $(GLINK FunctionLiteralBody)
$(D delegate) $(GLINK2 declaration, Type)$(OPT) $(GLINK ParameterMemberAttributes) $(OPT) $(GLINK FunctionLiteralBody)
$(GLINK ParameterMemberAttributes) $(GLINK FunctionLiteralBody)
$(GLINK FunctionLiteralBody)
$(GLINK Lambda)

$(GNAME ParameterAttributes):
$(GLINK2 function, Parameters)
$(GLINK2 function, Parameters) $(GLINK2 function, FunctionAttributes)
$(GLINK2 function, Parameters) $(GLINK2 function, FunctionAttributes)$(OPT)

$(GNAME ParameterMemberAttributes):
$(GLINK2 function, Parameters) $(GLINK2 function, MemberFunctionAttributes)$(OPT)

$(GNAME FunctionLiteralBody):
$(GLINK2 statement, BlockStatement)
Expand Down Expand Up @@ -1559,8 +1561,8 @@ $(H4 Lambdas)
$(GRAMMAR
$(GNAME Lambda):
$(D function) $(GLINK2 declaration, Type)$(OPT) $(GLINK ParameterAttributes) $(D =>) $(GLINK AssignExpression)
$(D delegate) $(GLINK2 declaration, Type)$(OPT) $(GLINK ParameterAttributes) $(D =>) $(GLINK AssignExpression)
$(GLINK ParameterAttributes) $(D =>) $(GLINK AssignExpression)
$(D delegate) $(GLINK2 declaration, Type)$(OPT) $(GLINK ParameterMemberAttributes) $(D =>) $(GLINK AssignExpression)
$(GLINK ParameterMemberAttributes) $(D =>) $(GLINK AssignExpression)
$(IDENTIFIER) $(D =>) $(GLINK AssignExpression)
)

Expand Down
14 changes: 8 additions & 6 deletions grammar.dd
Expand Up @@ -377,25 +377,27 @@ $(GNAME ValueExpression):
$(GRAMMAR
$(GNAME FunctionLiteral):
$(D function) $(GLINK Type)$(OPT) $(GLINK ParameterAttributes) $(OPT) $(GLINK FunctionLiteralBody)
$(D delegate) $(GLINK Type)$(OPT) $(GLINK ParameterAttributes) $(OPT) $(GLINK FunctionLiteralBody)
$(GLINK ParameterAttributes) $(GLINK FunctionLiteralBody)
$(D delegate) $(GLINK Type)$(OPT) $(GLINK ParameterMemberAttributes) $(OPT) $(GLINK FunctionLiteralBody)
$(GLINK ParameterMemberAttributes) $(GLINK FunctionLiteralBody)
$(GLINK FunctionLiteralBody)
$(GLINK Lambda)
)

$(GRAMMAR
$(GNAME ParameterAttributes):
$(GLINK Parameters)
$(GLINK Parameters) $(GLINK FunctionAttributes)
$(GLINK Parameters) $(GLINK FunctionAttributes)$(OPT)

$(GNAME ParameterMemberAttributes):
$(GLINK Parameters) $(GLINK MemberFunctionAttributes)$(OPT)

$(GNAME FunctionLiteralBody):
$(GLINK BlockStatement)
$(GLINK FunctionContracts)$(OPT) $(GLINK BodyStatement)

$(GNAME Lambda):
$(D function) $(GLINK Type)$(OPT) $(GLINK ParameterAttributes) $(D =>) $(GLINK AssignExpression)
$(D delegate) $(GLINK Type)$(OPT) $(GLINK ParameterAttributes) $(D =>) $(GLINK AssignExpression)
$(GLINK ParameterAttributes) $(D =>) $(GLINK AssignExpression)
$(D delegate) $(GLINK Type)$(OPT) $(GLINK ParameterMemberAttributes) $(D =>) $(GLINK AssignExpression)
$(GLINK ParameterMemberAttributes) $(D =>) $(GLINK AssignExpression)
$(IDENTIFIER) $(D =>) $(GLINK AssignExpression)
)

Expand Down

0 comments on commit d8330a1

Please sign in to comment.