[Issue 12660] New: Wrong non- at nogc function invariant error

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Apr 26 16:32:07 PDT 2014


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

          Issue ID: 12660
           Summary: Wrong non- at 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: nobody at puremagic.com
          Reporter: bearophile_hugs at 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- at 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.

--


More information about the Digitalmars-d-bugs mailing list