Bug 1522 – multiple TypeInfo definitions

Status
RESOLVED
Resolution
LATER
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2007-09-20T09:41:07Z
Last change time
2019-08-20T13:44:54Z
Keywords
wrong-code
Assigned to
No Owner
Creator
Jascha Wetzel

Comments

Comment #0 by jascha — 2007-09-20T09:41:07Z
compiling the example from the doc-comment makes the linker complain about multiple defined symbols. on windows this does not happen. the "mixin Reflect;" creates static constructors and saves the TypeInfos for all functions of the class in a static assoc array. this includes opEqual and opCmp that both are of type FC6ObjectZi and thus have the same TypeInfo. in this case the _D20TypeInfo_FC6ObjectZi6__initZ is defined twice (or more often), which provokes the linker error.
Comment #1 by razvan.nitu1305 — 2019-08-20T13:44:25Z
The link to the source file is broken. The bug cannot be solved if we do not have a test case.