https://issues.dlang.org/show_bug.cgi?id=21062
Issue ID: 21062
Summary: Compiler produces wildly different diagnostics based
on variable names
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
DMD 2.093 (also tested with 2.089)
This is OK:
-----
struct S
{
public time_t time;
public bool synced;
}
-----
$ dmd -c test.d
> test.d(9,19): Error: undefined identifier `time_t`, did you mean variable
> `time`?
But look at this:
-----
struct S
{
public time_t time;
public bool synchronized;
}
-----
$ dmd -c test.d
> test.d(4): Error: no identifier for declarator bool
> test.d(4): Error: declaration expected following attribute, not ;
There is no mention of `time_t` being undefined.
--