[Issue 18508] Using statement without effect should error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Feb 23 22:48:00 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18508
Jonathan M Davis <issues.dlang at jmdavisProg.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |issues.dlang at jmdavisProg.co
| |m
--- Comment #1 from Jonathan M Davis <issues.dlang at jmdavisProg.com> ---
I'm not sure what is and isn't supposed to be legal with the comma operator
now, but if the issue is that the statement has no effect, then there isn't
necessarily a bug here, because f isn't pure. Yes, _we_ can see that f has no
effect, but the compiler doesn't look past the signature. Now, I slapped pure
on f to see what would happen, and that still doesn't produce an error, so
there probably is a bug if your example has pure on f, but as-is, I'm not sure
that it actually shows a bug.
--
More information about the Digitalmars-d-bugs
mailing list