www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7827] New: DMD asserts using delegate and type inference

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7827

           Summary: DMD asserts using delegate and type inference
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: doob me.com



When I try to use a delegate as template parameter and type inference DMD
asserts with this message:

Assertion failed: (!vthis->csym), function toObjFile, file glue.c, line 686.

https://github.com/D-Programming-Language/dmd/blob/master/src/glue.c#L686

I haven't been able to find a reduced test case but this is the code that
fails:

https://github.com/jacob-carlborg/phobos/blob/terminal/std/event.d#L113

If I changed that line to:

eventHandlers = .remove!((e) { return e == eventHandler; })(eventHandlers);

Or

eventHandlers = .remove!(e => e == eventHandler)(eventHandlers);

The assert is triggered. I'm using:

DMD: b41a2c360f09b83e4de6951f1e7538372319704f
Druntime: b41a2c360f09b83e4de6951f1e7538372319704f
Phobos: b93e9c9fd47fe309bb422408cbedc5897d87c368

I'm compiling on Mac OS X for 32bit.

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


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice
                 CC|                            |clugdbug yahoo.com.au
            Summary|DMD asserts using delegate  |ICE(glue.c, !vthis->csym)
                   |and type inference          |delegate and type inference



This is probably a duplicate of bug 4129.
Two others which ICE at the same place are bug 6896 and bug 4481.

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


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com



22:18:42 PDT ---
Jacob - since 4481 and 6896 appear to be fixed, and 4129 is D1 only, can you
see if this still is a problem here?

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





 Jacob - since 4481 and 6896 appear to be fixed, and 4129 is D1 only, can you
 see if this still is a problem here?
I cannot reproduce this error anymore. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 07 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7827


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME



13:36:23 PDT ---
Thank you. Marking as resolved.

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