https://issues.dlang.org/show_bug.cgi?id=15984
Stewart Gordon <s...@iname.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |s...@iname.com --- Comment #3 from Stewart Gordon <s...@iname.com> --- The posted code doesn't show the problem as I try (DMD 2.071.0 Windows). In order to test it, one needs to make sure C's contract fails. (Though this is down to another issue, bug 6857.) But even better would be to add debugging output to I's in contract. ---------- import std.stdio; interface I { void f(int i) in { writeln(i); assert(i == 5); } } class C : I { void f(int i) in { assert (false); } body { } } void main() { I i = new C; i.f(5); } ---------- 4202755 core.exception.AssertError@bz15984.d(14): Assertion failure ---------------- 0x00402D3B 0x00402103 0x00403EA7 0x00403DA8 0x0040270F 0x769DD4D1 in BaseThreadInitThunk 0x77201593 in RtlInitializeExceptionChain 0x77201566 in RtlInitializeExceptionChain ---------- --