[Issue 6415] New: Placement of pure and nothrow for invariant()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jul 30 19:46:09 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6415

           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
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list