https://issues.dlang.org/show_bug.cgi?id=23086
Issue ID: 23086 Summary: spurious case of `expression has no effect` message Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: diagnostic, rejects-valid Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: b2.t...@gmx.com For the following code ``` static int v; ref int a() { a++; return a; } int main() { a == 0; return v ? 0 : 1; } ``` we get, with -de, the output > /tmp/temp_7F3C12CCD670.d:15:5: Error: `a() == 0` has no effect but the effect of the call directly influences the return code of the program. --