https://issues.dlang.org/show_bug.cgi?id=17142
Issue ID: 17142
Summary: Empty statement warnings conflicts with type inference
errors
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
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.
--