Bug 15463 – Compilation error when post-incrementing/decrementing a parenthized variable

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2015-12-19T15:57:04Z
Last change time
2022-10-24T13:30:29Z
Assigned to
No Owner
Creator
Nickolay Bukreyev

Comments

Comment #0 by buknik95 — 2015-12-19T15:57:04Z
``` unittest { int a = 1; (a)--; } ``` ``` test.d(3): Error: expression expected, not ';' test.d(4): Error: C style cast illegal, use cast(a)--0 test.d(4): Error: found '}' when expecting ';' following statement test.d(5): Error: found 'EOF' when expecting '}' following compound statement ``` v2.069.2
Comment #1 by razvan.nitu1305 — 2022-10-24T13:30:29Z
*** This issue has been marked as a duplicate of issue 7184 ***