https://issues.dlang.org/show_bug.cgi?id=17420
--- Comment #3 from Nick Treleaven <[email protected]> --- Sorry, yes (didn't have the source code to hand). > If the toString overload is marked with any of these, hasToString!(YourType) > == 0 class N { @nogc void toString(scope void delegate(const(char)[])@nogc sink); } hasToString!(N, char) is 2. I think the problem is: class E : Throwable { override void toString(scope void delegate(const(char[]))@nogc sink) const; } Error: function E.toString does not override any function, did you mean to override 'object.Throwable.toString'? First, note that Throwable.toString takes a delegate with a const(char[]) parameter, not const(char)[], this is confusing and should be fixed. Next, if you remove @nogc from sink above it compiles. Shouldn't dmd allow overriding a method that takes a non-@nogc delegate with one that takes a @nogc delegate? --
