Skip to content

Commit

Permalink
Merge pull request #1929 from BBasile/issue-17925
Browse files Browse the repository at this point in the history
fix issue 17925 - Mention the old body keyword
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
  • Loading branch information
dlang-bot authored Nov 20, 2017
2 parents 6e7dd8c + aad07a8 commit 3ccba5e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/contracts.dd
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ do
...code...
}
------

$(P Since $(LINK2 https://github.com/dlang/DIPs/blob/master/DIPs/DIP1003.md, DIP1003 has been applied)
the actual function body starts with $(D do).
In the past, $(D body) was used, and could still be encountered in old code bases.
In the long term, $(D body) may be deprecated, but for now it's allowed
as a keyword in this context and as an identifier in the function body,
although $(D do) is preferred.)

$(P By definition, if a pre contract fails, then the function received bad
parameters.
An AssertError is thrown. If a post contract fails,
Expand Down

0 comments on commit 3ccba5e

Please sign in to comment.