http://d.puremagic.com/issues/show_bug.cgi?id=10254
Simen Kjaeraas <simen.kja...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simen.kja...@gmail.com --- Comment #1 from Simen Kjaeraas <simen.kja...@gmail.com> 2013-06-03 08:34:47 PDT --- Interestingly, this fails to compile: int a; auto foo() pure { return (){a=2;} // Error: pure function 'foo.foo.__lambda1' // cannot access mutable static data 'a' } void main() { a = 1; auto x = foo(); x(); assert(a == 1); } This behavior indicates to me that it is in fact A's constructor that should be a compilation error. It is a Voldemort type anyway, so how are you ever going to call that constructor safely? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------