Bug 12490 – No "Error: , has no effect" Error for comma expression LHS

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-29T14:34:46Z
Last change time
2020-07-14T10:55:06Z
Keywords
accepts-invalid, diagnostic, pull
Assigned to
No Owner
Creator
monarchdodra

Comments

Comment #0 by monarchdodra — 2014-03-29T14:34:46Z
//---- 5, someFun(); //---- 1 + 2, someFun(); //---- I think these should trigger an error. The LHS clearly does nothing, and the result is not stored anywhere.
Comment #1 by b2.temp — 2020-07-04T17:56:04Z
--- void someFun(){} void main() { 5, someFun(); 1 + 2, someFun(); } ---
Comment #2 by dlang-bot — 2020-07-06T03:32:30Z
@NilsLankila created dlang/dmd pull request #11377 "fix issue 12490 - No "Error: , has no effect" Error for comma expression LHS" fixing this issue: - fix issue 12490 - No "Error: , has no effect" Error for comma expression LHS Following a comment in sideeffect.d on how to check the LHS. https://github.com/dlang/dmd/pull/11377
Comment #3 by dlang-bot — 2020-07-14T10:55:06Z
dlang/dmd pull request #11377 "fix issue 12490 - No "Error: , has no effect" Error for comma expression LHS" was merged into master: - 5c4c630ab3be05b3cc3b60165b0e662f5d98eaa9 by Nils Lankila: fix issue 12490 - No "Error: , has no effect" Error for comma expression LHS Following a comment in sideeffect.d on how to check the LHS. https://github.com/dlang/dmd/pull/11377