https://issues.dlang.org/show_bug.cgi?id=13113
Kenji Hara <k.hara...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |regression --- Comment #9 from Kenji Hara <k.hara...@gmail.com> --- (In reply to Rainer Schuetze from comment #8) > > So, the original issue is not a compiler regression. It was introduced by > > druntime change in Gcx class invariant code. > > I cannot test the current gc.d code with dmd 2.065 because of other changes, > but the reduced test case works with that version. Isn't this a regression > for user code, too? OK... make sense. So, I'd propose that direct invariant calls in constructor and destructor should bypass attribute enforcement. https://github.com/D-Programming-Language/dmd/pull/3775 Of course it is debatable behavior, but attribute enforcement does not work _at all_ on virtual invariant calls in normal member functions, so the change itself would not make things much worse. --