[Issue 8776] New: pure static this can't access inhexistant field __gate
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Oct 7 13:37:20 PDT 2012
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 at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at 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: -------
More information about the Digitalmars-d-bugs
mailing list