Bug 9679 – Refused const/immutable assignment in conditional

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-03-09T19:47:00Z
Last change time
2015-06-17T21:03:41Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2013-03-09T19:47:16Z
void main() { if (int x = 1) {} // OK if (auto x = 1) {} // OK if (const int x = 1) {} // OK if (immutable int x = 1) {} // OK if (const x = 1) {} // error if (immutable x = 1) {} // error } dmd 2.063alpha: test.d(6): Error: (arguments) expected following const(x) test.d(7): Error: (arguments) expected following immutable(x)
Comment #1 by k.hara.pg — 2013-04-25T23:21:54Z
Comment #2 by github-bugzilla — 2013-04-25T23:47:21Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/95279de35ac5b4ccf7e801b623cbff18dc4f5315 fix Issue 9679 - Refused const/immutable assignment in conditional https://github.com/D-Programming-Language/dmd/commit/af10fde19592278f38862323e5caeda6ccfdebb2 Merge pull request #1937 from 9rnsr/fix9679 Issue 9679 - Refused const/immutable assignment in conditional
Comment #3 by github-bugzilla — 2013-04-27T12:31:49Z
Comment #4 by github-bugzilla — 2013-05-26T16:39:23Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/413211e4c22f85cba9703b4d2bad546772ac026b fix issue 9679 - DMD doesn't parse valid PostfixExpression . NewExpression syntax. https://github.com/D-Programming-Language/dmd/commit/3268b854fe0250fd713feb8de40dff5a7bf73c5b Merge pull request #2081 from hpohl/9649 fix issue 9679 - DMD doesn't parse valid PostfixExpression . NewExpression syntax.
Comment #5 by bearophile_hugs — 2013-05-26T19:21:17Z
(In reply to comment #4) > Commits pushed to master at https://github.com/D-Programming-Language/dmd > > https://github.com/D-Programming-Language/dmd/commit/413211e4c22f85cba9703b4d2bad546772ac026b > fix issue 9679 - DMD doesn't parse valid PostfixExpression . > NewExpression syntax. > > https://github.com/D-Programming-Language/dmd/commit/3268b854fe0250fd713feb8de40dff5a7bf73c5b > Merge pull request #2081 from hpohl/9649 > > fix issue 9679 - DMD doesn't parse valid PostfixExpression . NewExpression > syntax. This seems for issue 9649?
Comment #6 by github-bugzilla — 2015-03-29T07:39:13Z
Comment #7 by github-bugzilla — 2015-06-17T21:03:41Z