DMD asserts using delegate and type inference

Jacob Carlborg doob at me.com
Tue Apr 3 10:00:35 PDT 2012


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.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list