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.
@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
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