[Issue 7533] New: Error with no line number with pure static ctor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 17 09:55:40 PST 2012


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

           Summary: Error with no line number with pure static ctor
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2012-02-17 09:55:39 PST ---
immutable struct Foo(int n) {
    pure static this() {}
}
void main() {
    Foo!5 foo;
}


DMD 2.058 gives:

Error: pure function '_staticCtor2' cannot access mutable static data '__gate'
test2.d(5): Error: template instance test2.Foo!(5) error instantiating

-- 
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