[Issue 10853] New: ClassInfo.find doesn't work for nested classes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 19 08:11:39 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10853

           Summary: ClassInfo.find doesn't work for nested classes
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: doob at me.com


--- Comment #0 from Jacob Carlborg <doob at me.com> 2013-08-19 08:11:38 PDT ---
I just noticed that ClassInfo.find doesn't work for nested classes, even if
they are static. For example:

unittest
{
    static class Foo { }
    auto name = Foo.classinfo.name;
    assert(ClassInfo.find(name) is null); // unfortunately passes
}

I was about to try the documented unit test feature in my work on
std.serialization but I want to have the type I'm serializing visible in the
example as well.

Is it possible to fix somehow? I looked at the symbol table and it seems the
class info is there, but ClassInfo.find just can't find it.

0000000100040980 D _D4test14__unittestL7_1FZv3Foo6__initZ
0000000100040a50 D _D4test14__unittestL7_1FZv3Foo6__vtblZ
00000001000409b0 D _D4test14__unittestL7_1FZv3Foo7__ClassZ

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list