digitalmars.D.bugs - [Issue 14688] New: dmd writes paren-less expression in generated
- via Digitalmars-d-bugs (30/30) Jun 11 2015 https://issues.dlang.org/show_bug.cgi?id=14688
https://issues.dlang.org/show_bug.cgi?id=14688 Issue ID: 14688 Summary: dmd writes paren-less expression in generated .di, subsequently refuses it Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: andrei erdani.com 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. --
Jun 11 2015