[Issue 6107] New: ICE when a non-template member named '__ctor' exists in a struct, and the constructor is attempted to be invoked.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 5 00:57:18 PDT 2011


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

           Summary: ICE when a non-template member named '__ctor' exists
                    in a struct, and the constructor is attempted to be
                    invoked.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: kennytm at gmail.com


--- Comment #0 from kennytm at gmail.com 2011-06-05 00:52:47 PDT ---
Test case:

----------------------------------
struct Foo {
    enum __ctor = 4; // can also be a function, struct, alias, but template is
ok.
}
void main() {
    auto f = Foo("irrelevant"); // can also use 'new Foo(...)'
}
----------------------------------
Assertion failed: (td), function semantic, file expression.c, line 7040.
Abort trap
----------------------------------

-- 
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