interface SinkString { void toString(void delegate(string) sink); } class Aggregate : SinkString { override void toString(void delegate(string) @safe sink) @safe { sink("I'm an Aggreate!"); } } Here, void delegate(string) @safe is not a super-type of void delegate(string) which it would need to be to be sound by the Liskov substitution principle. To the contrary, it allows passing @system `sink`s to an Aggregate object through a SinkString reference.
Is this not a duplicate of: https://issues.dlang.org/show_bug.cgi?id=21538 ?
*** This issue has been marked as a duplicate of issue 21538 ***