www.digitalmars.com         C & C++   DMDScript  

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

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: kennytm gmail.com



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:


flag=0) at mtype.c:4706
4706        assert(next);

1498            toDecoBuffer(&buf);

1206            pto = t->merge();

expression.c:4758
4758                type = fd->type->pointerTo();

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: -------
May 11 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5978


SomeDude <lovelydear mailmetrash.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lovelydear mailmetrash.com
           Platform|Other                       |All
         OS/Version|Mac OS X                    |All



PDT ---
Also fails on Win32 2.059

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 20 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5978


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com



13:01:03 PST ---
Now works in 2.062 git-head.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 08 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5978


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |WORKSFORME



15:00:38 PST ---
Added test case: https://github.com/D-Programming-Language/dmd/pull/1444

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 08 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5978




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/ff62d9eaee74287928f5b7858ac5b8cbd6496d98
add test case for
Issue 5978 - ICE(mtype.c) when calling __traits(parent) on the child of an
anonymous function.
Issue 5978 - ICE(mtype.c) when calling __traits(parent) on the child of an
anonymous function.

https://github.com/D-Programming-Language/dmd/commit/15ed69199bde6d857354e6fe439f987fcc570b4c


add test case for issue 5978

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 08 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5978


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WORKSFORME                  |FIXED



In current, dmd test suite has a test case for this bug.

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