[Issue 6235] Regression(DMD 2.053) ICE on typeof(Range.init[0..$]) inside a templated struct/class

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 4 01:10:26 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6235



--- Comment #4 from yebblies <yebblies at gmail.com> 2011-07-04 18:05:23 EST ---
(In reply to comment #3)
> > exp[... $ ... ] => exp[... exp.length ...] ?
> 
> I think it's because exp may have side effects, so it should only be evaluated
> once.

Ah, of course.
Can you see anything wrong with rewriting it as:
(auto __tmp = exp, __tmp[... __tmp.length ...])
I'll have to dig into it to be sure, but I think something like this would
solve a lot of the problems caused by __dollar.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list