http://d.puremagic.com/issues/show_bug.cgi?id=10064
Denis Shelomovskij <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|opDollar+final interface |opDollar called on garbage |function results in a wrong | |code | --- Comment #1 from Denis Shelomovskij <[email protected]> 2013-06-13 15:28:03 MSD --- I was incorrect about the issue source. `opDollar` is just called on a garbage: --- struct S { int x = 3; @disable this(); this(int) { x = 7; } int opSlice(size_t, size_t) { return 0; } @property size_t opDollar() { assert(x == 7 || x == 3); // fails assert(x == 7); return 0; } } void main() { auto x = S(0)[0 .. $]; } --- As a result e.g. this will fail too: --- import std.range; void main() { auto x = zip([1])[$ - 1]; } --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
