https://issues.dlang.org/show_bug.cgi?id=12660

--- Comment #2 from bearophile_h...@eml.cc ---
(In reply to yebblies from comment #1)
> I vaguely recall this being about attributes on the LHS of invariants being
> ignored.

If I put @nogc on the right:


class Foo {
    this() @nogc {}
    invariant() @nogc {}
}
void main() {}


temp.d(3,17): Error: statement expected to be { }, not @
temp.d(3,23): Error: basic type expected, not {
temp.d(3,23): Error: no identifier for declarator int
temp.d(3,23): Error: Declaration expected, not '{'
temp.d(5,15): Error: } expected following member declarations in aggregate

--

Reply via email to