[Issue 6414] New: Possible problem with pure and const attribute
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jul 30 19:45:13 PDT 2011
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: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 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: -------
More information about the Digitalmars-d-bugs
mailing list