Bug 14688 – dmd writes paren-less expression in generated .di, subsequently refuses it

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-06-12T04:55:23Z
Last change time
2018-03-12T14:25:19Z
Assigned to
No Owner
Creator
Andrei Alexandrescu
Blocks
14680

Comments

Comment #0 by andrei — 2015-06-12T04:55:23Z
This function: int fun()(int a, int b) { if ((a > 0) | (b > 0)) return 4; return 3; } when put through the .di generator, results in this code: int fun()(int a, int b) { if (a > 0 | b > 0) return 4; return 3; } Subsequently dmd doesn't like the paren-less expression, causing a compile-time error.
Comment #1 by razvan.nitu1305 — 2018-03-12T14:25:19Z
This has been fixed by [1]. Closing as fixed. [1] https://github.com/dlang/dmd/pull/7270