This code fails in DMD 2.063 (+ current git) with an Error in the glue layer, it worked under 2.063
module glwtf.input;
import std.signals;
struct DefaultAA(value_type, key_type, Default...) if(Default.length < 2) {
value_type[key_type] _store;
}
struct SignalWrapper(Args...) {
mixin Signal!(Args);
}
class BaseGLFWEventHandler {
DefaultAA!(SignalWrapper!(), int) single_key_down;
}
Error: mutable method glwtf.input.SignalWrapper!().SignalWrapper.Signal!().~this is not callable using a const object
dmd: glue.c:1215: virtual unsigned int Type::totym(): Assertion `0' failed.
Odly this fails on my machine (archlinux 64 bit, and on Windows (tested by "Cybershadow")) but not on dpaste, neither 2.063 nor git
Comment #1 by dlang-bugzilla — 2013-06-11T11:12:26Z
My DMD git was outdated (was on 9edb35f64c700eca65be718aa057cdc344896836). The error does not occur with 4bbef4f21141c6b21f35d133f348a3b215ad6513.
Comment #2 by k.hara.pg — 2013-06-13T19:16:28Z
(In reply to comment #0)
> This code fails in DMD 2.063 (+ current git) with an Error in the glue layer,
> it worked under 2.063
>
> module glwtf.input;
> import std.signals;
> struct DefaultAA(value_type, key_type, Default...) if(Default.length < 2) {
> value_type[key_type] _store;
> }
> struct SignalWrapper(Args...) {
> mixin Signal!(Args);
> }
> class BaseGLFWEventHandler {
> DefaultAA!(SignalWrapper!(), int) single_key_down;
> }
>
> Error: mutable method
> glwtf.input.SignalWrapper!().SignalWrapper.Signal!().~this is not callable
> using a const object
> dmd: glue.c:1215: virtual unsigned int Type::totym(): Assertion `0' failed.
>
>
> Odly this fails on my machine (archlinux 64 bit, and on Windows (tested by
> "Cybershadow")) but not on dpaste, neither 2.063 nor git
This looks like a dup of bug 10106. You may need to update your local druntime.