www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14401] New: typeid(shared X).init is empty for class types

https://issues.dlang.org/show_bug.cgi?id=14401

          Issue ID: 14401
           Summary: typeid(shared X).init is empty for class types
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: andrei erdani.com

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.

--
Apr 02 2015