Comment #2 by dlang-bugzilla — 2014-02-12T17:49:23Z
Looks like a duplicate of bug 12144.
Comment #3 by code — 2014-02-12T17:50:45Z
Also happens with a sensible opCmp, like
int opCmp(const ref Bar) { return 0; }
It must deviate from the default signature though, i.e. can't be
int opCmp(const ref Bar) const { return 0; }
Comment #4 by code — 2014-02-12T17:52:30Z
*** This issue has been marked as a duplicate of issue 12144 ***
Comment #5 by code — 2014-02-13T05:41:47Z
I think we should try to solve this by only creating one TypeInfo per struct, but always generate it, when the struct is defined. If the TypeInfo is referenced somewhere else, it will need to link against the module that defined the struct.
Comment #6 by code — 2014-02-13T16:41:25Z
The root cause for this bug was, that the TypeInfo
for structs can only be generated after semantic3 for
that struct was run. This is not possible if the TypeInfo
is needed during the obj generation pass, e.g. because
it is referenced by an array TypeInfo.
https://github.com/D-Programming-Language/dmd/pull/3255