Bug 14401 – typeid(shared X).init is empty for class types
Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-04-03T05:20:00Z
Last change time
2017-07-19T17:42:56Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
andrei
Comments
Comment #0 by andrei — 2015-04-03T05:20:57Z
Consider:
class X
{
int a;
}
void main()
{
import std.stdio;
writeln(typeid(X).init.length);
writeln(typeid(shared(X)).init.length);
}
The program prints 20 and 0.
This is a blocker for work on std.allocator.