http://d.puremagic.com/issues/show_bug.cgi?id=4416
Summary: Function with ref argument breaks struct method const attribute Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2010-07-02 05:29:05 PDT --- This is a wrong D2 program, because bar() modifies the state of the Foo instance, despite bar is const, but with v2.047 it compiles and runs with no errors: void spam(ref int x) { x++; } struct Foo { int x; void bar() const { spam(x); } } void main() { Foo b; assert(b.x == 0); b.bar(); assert(b.x == 1); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------