Skip to content

Commit 80fb1d5

Browse files
Fix do being optional after a contract statement
Contrary to contract expressions, `in` and `out` statements require `do` to indicate the function body.
1 parent 1ce2554 commit 80fb1d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/function.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ $(GNAME FunctionLiteralBody):
9999
$(GNAME SpecifiedFunctionBody):
100100
$(D do)$(OPT) $(GLINK2 statement, BlockStatement)
101101
$(GLINK FunctionContracts)$(OPT) $(GLINK InOutContractExpression) $(D do)$(OPT) $(GLINK2 statement, BlockStatement)
102-
$(GLINK FunctionContracts)$(OPT) $(GLINK InOutStatement) $(D do)$(OPT) $(GLINK2 statement, BlockStatement)
102+
$(GLINK FunctionContracts)$(OPT) $(GLINK InOutStatement) $(D do) $(GLINK2 statement, BlockStatement)
103103

104104
$(GNAME MissingFunctionBody):
105105
$(D ;)

0 commit comments

Comments
 (0)