[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 06:06:01 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6235
--- Comment #5 from Don <clugdbug at yahoo.com.au> 2011-07-04 06:00:57 PDT ---
(In reply to comment #4)
> (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 ...])
Not sure. There might be problem if exp defines postblit.
> 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