[Issue 12233] New: Attempting to use TypeInfo.init results in a compiler error due to lack of 'this'.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 23 03:08:53 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12233

           Summary: Attempting to use TypeInfo.init results in a compiler
                    error due to lack of 'this'.
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: opantm2+dbugs at gmail.com


--- Comment #0 from Kapps <opantm2+dbugs at gmail.com> 2014-02-23 03:08:51 PST ---
It tries to use the init() method on TypeInfo, which fails because init() is
not static. Particularly annoying in generic code, which is where .init is
meant to be used in the first place...

Sample:

import std.stdio;
void main() {
    writeln(TypeInfo.init);
}

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


More information about the Digitalmars-d-bugs mailing list