http://d.puremagic.com/issues/show_bug.cgi?id=5006
Summary: 'pure' unenforced in a nested function Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2010-10-06 14:08:53 PDT --- This D2 code compiles and runs with no errors with dmd 2.049, and it ignores the "pure" attribute: int z = 1000; int foo(int x) { pure int bar(int y) { z++; return x + y + z; } return bar(x * x); } void main() { assert(foo(10) == 1111); } I expect this code to not compile. Is DMD missing unit tests for this? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------