[Issue 3470] [tdpl]: .length should not pop up inside indexing expressions.

2015-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3470

Andrei Alexandrescu  changed:

   What|Removed |Added

Version|2.035   |D2

--


[Issue 3470] [tdpl]: .length should not pop up inside indexing expressions.

2010-03-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3470


Don  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #6 from Don  2010-03-12 14:10:09 PST ---
Fixed DMD2.041.

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


[Issue 3470] [tdpl]: .length should not pop up inside indexing expressions.

2009-11-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3470



--- Comment #3 from Don  2009-11-04 12:16:12 PST ---
(In reply to comment #2)
> Great work, Don! Since you're there and the code is fresh in your mind, I
> suggest you operate these two additional changes that were discussed in the
> newsgroup several times:
> 
> a) In single-argument index and slice expressions, rewrite $ to __a.length,
> where __a is the already-evaluated array being indexed/sliced.
> 
> b) In multi-argument index and slice expressions, rewrite $ to 
> __a.lengths!(n),
> where n is the compile-time argument position where $ appears.

Actually, the 'opDollar' problem is not very similar to this one, so I'll
create a new ticket for it. I've had a go at it. The difficult bit is that
currently '$' turns into a symbol, but it needs to become an expression, and it
needs the 'this' pointer, which isn't in scope. I can get around this by
creating local variables to hold the various values of $ for each dimension,
but I'm not sure if that's the right approach. Still not working, but close.

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


[Issue 3470] [tdpl]: .length should not pop up inside indexing expressions.

2009-11-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3470


Andrei Alexandrescu  changed:

   What|Removed |Added

 CC||and...@metalanguage.com


--- Comment #2 from Andrei Alexandrescu  2009-11-03 
05:15:37 PST ---
Great work, Don! Since you're there and the code is fresh in your mind, I
suggest you operate these two additional changes that were discussed in the
newsgroup several times:

a) In single-argument index and slice expressions, rewrite $ to __a.length,
where __a is the already-evaluated array being indexed/sliced.

b) In multi-argument index and slice expressions, rewrite $ to __a.lengths!(n),
where n is the compile-time argument position where $ appears.

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


[Issue 3470] [tdpl]: .length should not pop up inside indexing expressions.

2009-11-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3470



--- Comment #1 from Don  2009-11-03 03:41:38 PST ---
Note for Walter: This is the list of test suite files which are using [length]
and need to change to [$]:

test16
test23
test34
test42
template4
template6
hospital
stress
lazy
variadic
testfile

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