http://d.puremagic.com/issues/show_bug.cgi?id=6414
Summary: Possible problem with pure and const attribute
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2011-07-30 19:45:12 PDT ---
Is this a bug?
class Foo {
const int x;
pure void bar()
in {
int y = x;
} body {}
}
void main() {}
DMD 2.054 gives:
temp.d(5): Error: pure nested function 'bar' cannot access mutable data 'x'
But x isn't even mutable.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------