Bug 3349 – typeid(shared(T)) generates wrong value
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2009-09-28T09:16:00Z
Last change time
2015-06-09T01:26:47Z
Keywords
wrong-code
Assigned to
nobody
Creator
k.hanazuki
Comments
Comment #0 by k.hanazuki — 2009-09-28T09:16:19Z
Typeid of a shared type is incorrect.
Its .next seems referring to it circularly.
----
void main() {
auto ti = typeid(shared(int));
assert(cast(TypeInfo_Shared)ti);
assert((cast(TypeInfo_Shared)ti).next == typeid(int));
// object.Error: Stack Overflow
}
Comment #1 by leandro.lucarella — 2009-10-29T06:45:51Z