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

          Issue ID: 12660
           Summary: Wrong non-@nogc function invariant error
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Keywords: diagnostic, rejects-valid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nob...@puremagic.com
          Reporter: bearophile_h...@eml.cc

I don't understand this:


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


DMD 2.066alpha gives:

test.d(2,5): Error: @nogc function 'test.Foo.this' cannot call non-@nogc
function 'test.Foo.__invariant'


Currently this bug has severity "normal", but if this issue is valid then it
could be regarded as blocker for the release of 2.066.

--

Reply via email to