Summary: Placement of pure and nothrow for invariant()
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2011-07-30 19:46:08 PDT ---
This code shows a problem with placement of pure and nothrow:

class Foo {
    pure nothrow invariant() {} // OK
    invariant() pure nothrow {} // Error
void main() {}

DMD 2.054 gives:

test.d(3): statement expected to be { }, not pure
test.d(3): basic type expected, not {
test.d(3): no identifier for declarator int
test.d(3): semicolon expected, not '{'
test.d(3): Declaration expected, not '{'
test.d(5): } expected following member declarations in aggregate

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to