Sample code (this compile). module dsfml.graphics.view; struct Fail { void foobar() const { cppFoobar(this); } } void cppFoobar(ref Fail fail) {} void main() { Fail f; f.foobar(); } This program should trigger an error because of constness issue. It doesn't . tested with dmd 2.057 and gdc (4.7 - 2.057) as well.
Fixed in DMD 2.058head.
*** This issue has been marked as a duplicate of issue 5493 ***