http://d.puremagic.com/issues/show_bug.cgi?id=9437
--- Comment #5 from [email protected] 2013-02-01 07:36:26 PST --- (In reply to comment #4) > i do not talk to modify a range while is in a loop but access to const method > should be possible. > <type> name() const { ... } > > what is silently ? > > > R r = R( "Hello D users" ); > foreach( l; r ) > writeln( l, ", ", r.front() ); > > you have 2 variable r and are not the same for me is dangerous. I know now > what > happen. > But when you look this code it seem ok but is not. But that's the point, in that code, both "r" ARE the same variable. r is r. It is the *iteration* that is done on an un-named copy. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
