http://d.puremagic.com/issues/show_bug.cgi?id=9256
Summary: A purity-related error message in case of member access Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: minor Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2013-01-01 20:55:15 PST --- struct Foo { int x; } void main() pure { int y = Foo.x; } With DMD 2.061 gives this error message: test.d(5): Error: pure nested function 'main' cannot access mutable data 'x' But I think a better error message should be something like: test.d(5): Error: need 'this' to access member x -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------