http://d.puremagic.com/issues/show_bug.cgi?id=6293
Summary: [Regression 2.054] 'pure' does not work with member of array of aggregrate Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Keywords: rejects-valid Severity: regression Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: kenn...@gmail.com --- Comment #0 from kenn...@gmail.com 2011-07-12 01:38:45 PDT --- Test case ----------------------- class C6293 { int token; } struct S6293 { const(C6293)[] tokens; void f() const pure { const(C6293) a = tokens[0]; int b = a.token; // <-- separating it is ok. int c = tokens[0].token; // <-- cannot access mutable data 'token' } } ----------------------- x.d(9): Error: pure nested function 'f' cannot access mutable data 'token' ----------------------- If that 'b' can be accessed in a 'pure' function, there's no reason 'c' cannot. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------