[Issue 5978] New: ICE when calling __traits(parent) on the child of an anonymous function.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 11 08:49:08 PDT 2011


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

           Summary: ICE when calling __traits(parent) on the child of an
                    anonymous function.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: kennytm at gmail.com


--- Comment #0 from kennytm at gmail.com 2011-05-11 08:45:07 PDT ---
Test case:

--------------------------------------------
void main() {
    () {
        int x;
        pragma(msg, __traits(parent, x));
    } ();
}
--------------------------------------------
Assertion failed: (next), function toDecoBuffer, file mtype.c, line 4706.
Abort trap
--------------------------------------------

The relevant stack trace:

#5  0x000cf227 in TypeFunction::toDecoBuffer (this=0x343ec0, buf=0xbfffea80,
flag=0) at mtype.c:4706
4706        assert(next);
#6  0x000d3545 in Type::merge (this=0x3440b0) at mtype.c:1498
1498            toDecoBuffer(&buf);
#7  0x000d4242 in Type::pointerTo (this=0x343ec0) at mtype.c:1206
1206            pto = t->merge();
#8  0x0007e3c0 in FuncExp::semantic (this=0x344090, sc=0x343cd0) at
expression.c:4758
4758                type = fd->type->pointerTo();
#9  0x00135413 in TraitsExp::semantic (this=0x310690, sc=0x343cd0) at
traits.c:384
384            e = e->semantic(sc);

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