[Issue 7226] New: Refused pure nothrow ctor syntax
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Jan  4 14:16:07 PST 2012
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=7226
           Summary: Refused pure nothrow ctor syntax
           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 2012-01-04 14:16:06 PST ---
I think this is a parser issue:
struct Foo {
    static this() pure nothrow {}
}
void main() {}
DMD 2.058head gives:
test.d(2): semicolon expected following function declaration
- - - - - - - - - - - - - -
A different case:
struct Foo {
    static pure this() {}
}
void main() {}
DMD 2.058head gives:
test.d(2): Error: constructor test.Foo.this default constructor for structs
only allowed with @disable and no body
-- 
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