Bug 17142 – Empty statement warnings conflicts with type inference errors

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-02-04T11:07:52Z
Last change time
2024-12-13T18:51:31Z
Assigned to
No Owner
Creator
Iain Buclaw
Moved to GitHub: dmd#19231 →

Comments

Comment #0 by ibuclaw — 2017-02-04T11:07:52Z
Pretty contrived examples pulled from mechanically reduced code (was reducing another bug). // Warning: use '{ }' for an empty statement, not a ';' static tokenText = { ; }; // Error: cannot infer type from struct initializer static tokenText = { {} }; // Warning: use '{ }' for an empty statement, not a ';' static tokenText = { {}; }; Perhaps another warning for missing '()' would be better here, as it seems pretty dubious to infer {;} as a lambda.
Comment #1 by robert.schadek — 2024-12-13T18:51:31Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19231 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB