D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20001 - Error: a struct is not a valid initializer for a _error_
Summary: Error: a struct is not a valid initializer for a _error_
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2019-06-24 22:28 UTC by elpenguino+D
Modified: 2019-06-25 11:53 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description elpenguino+D 2019-06-24 22:28:48 UTC
Very easy to reproduce:
```
X x = {};
```

This gives us a useful "undefined identifier X" error and the useless error mentioned in the title. The second error should not be printed in this case.
Comment 1 Dlang Bot 2019-06-25 11:09:01 UTC
@RazvanN7 created dlang/dmd pull request #10085 "Fix Issue 20001 - Error: a struct is not a valid initializer for a _error_" fixing this issue:

- Fix Issue 20001 - Error: a struct is not a valid initializer for a _error_

https://github.com/dlang/dmd/pull/10085
Comment 2 Dlang Bot 2019-06-25 11:53:25 UTC
dlang/dmd pull request #10085 "Fix Issue 20001 - Error: a struct is not a valid initializer for a _error_" was merged into master:

- fac3e5e12ac4951078a37834c445da9ca9fc6a7c by RazvanN7:
  Fix Issue 20001 - Error: a struct is not a valid initializer for a _error_

https://github.com/dlang/dmd/pull/10085