From 04bad53e9979bd3b4b1c73f56691da392bdd2a3c Mon Sep 17 00:00:00 2001 From: linkrope Date: Tue, 11 May 2021 22:22:38 +0200 Subject: [PATCH] Remove outdated definition of FunctionLiteralBody Pull request #2339 added the grammar rule FunctionLiteralBody: SpecifiedFunctionBody to function.dd, but did not remove the outdated grammar rule FunctionLiteralBody: BlockStatement FunctionContractsopt BodyStatement from expression.dd. The BodyStatement is gone (dead link), so I propose to change the links to FunctionLiteralBody to point to function.dd. (Alternatively, the grammar rule for FunctionLiteralBody could be moved from function.dd to expression.dd.) --- spec/expression.dd | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/spec/expression.dd b/spec/expression.dd index f63fc05c76..ad443ca33a 100644 --- a/spec/expression.dd +++ b/spec/expression.dd @@ -1661,7 +1661,7 @@ $(GNAME FunctionLiteral): $(D function) $(D ref)$(OPT) $(GLINK2 type, Type)$(OPT) $(GLINK ParameterWithAttributes) $(OPT) $(GLINK FunctionLiteralBody2) $(D delegate) $(D ref)$(OPT) $(GLINK2 type, Type)$(OPT) $(GLINK ParameterWithMemberAttributes) $(OPT) $(GLINK FunctionLiteralBody2) $(D ref)$(OPT) $(GLINK ParameterWithMemberAttributes) $(GLINK FunctionLiteralBody2) - $(GLINK FunctionLiteralBody) + $(GLINK2 function, FunctionLiteralBody) $(IDENTIFIER) $(D =>) $(GLINK AssignExpression) $(GNAME ParameterWithAttributes): @@ -1672,11 +1672,7 @@ $(GNAME ParameterWithMemberAttributes): $(GNAME FunctionLiteralBody2): $(D =>) $(GLINK AssignExpression) - $(GLINK FunctionLiteralBody) - -$(GNAME FunctionLiteralBody): - $(GLINK2 statement, BlockStatement) - $(GLINK2 function, FunctionContracts)$(OPT) $(GLINK2 function, BodyStatement) + $(GLINK2 function, FunctionLiteralBody) ) $(P $(I FunctionLiteral)s (also known as $(LNAME2 lambdas, $(I Lambdas))) enable embedding anonymous functions