diff options
author | Araq <rumpf_a@web.de> | 2017-11-05 01:25:39 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-11-05 01:26:04 +0100 |
commit | 742f43e57211c22fe1faa0c7ef991b9b0a1eadc9 (patch) | |
tree | 46bce5f9cf13f1f6f8dd45fc461615f779deb648 /changelog.md | |
parent | 9212aa9c0c7fe29c15485b9e0a841aca8359acfb (diff) | |
download | Nim-742f43e57211c22fe1faa0c7ef991b9b0a1eadc9.tar.gz |
fixes #6609; 'if' expressions support multiple statements; minor breaking change
Diffstat (limited to 'changelog.md')
-rw-r--r-- | changelog.md | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md index eebd47fb8..5947c49e5 100644 --- a/changelog.md +++ b/changelog.md @@ -39,5 +39,18 @@ - Added ``typetraits.$`` as an alias for ``typetraits.name``. - ``os.getEnv`` now takes an optional ``default`` parameter that tells ``getEnv`` what to return if the environment variable does not exist. -- Removed PDCurses wrapper from the stdlib and published it as a separate +- Removed PDCurses wrapper from the stdlib and published it as a separate Nimble package. +- The parsing rules of ``if`` expressions were changed so that multiple + statements are allowed in the branches. We found few code examples that + now fail because of this change, but here is one: + +.. code-block:: nim + + t[ti] = if exp_negative: '-' else: '+'; inc(ti) + +This now needs to be written as: + +.. code-block:: nim + + t[ti] = (if exp_negative: '-' else: '+'); inc(ti) |