October 07, 2012 [Issue 8776] New: pure static this can't access inhexistant field __gate | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=8776 Summary: pure static this can't access inhexistant field __gate Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic, rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 2012-10-07 13:25:13 PDT --- struct Foo(size_t N) { pure static this() {} } void main() { Foo!1 f1; } DMD 2.061alpha refuses code that seems OK giving some error that lack a line number: Error: pure function 'bug.Foo!(1).Foo._staticCtor2' cannot access mutable static data '__gate' Error: pure function 'bug.Foo!(1).Foo._staticCtor2' cannot access mutable static data '__gate' bug.d(5): Error: template instance bug.Foo!(1) error instantiating -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation