[Issue 2953] tuple.length rejected as a tuple parameter in a static foreach

2014-04-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2953

Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

Version|1.042   |D1

--


[Issue 2953] tuple.length rejected as a tuple parameter in a static foreach

2011-09-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2953


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

   Keywords||patch


--- Comment #3 from Kenji Hara k.hara...@gmail.com 2011-09-22 11:41:19 PDT ---
https://github.com/D-Programming-Language/dmd/pull/407

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


[Issue 2953] tuple.length rejected as a tuple parameter in a static foreach

2011-09-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2953


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #4 from Walter Bright bugzi...@digitalmars.com 2011-09-22 
15:01:39 PDT ---
https://github.com/D-Programming-Language/dmd/commit/3df93ae2529bc71c65aecdd819d91428a21d7185

https://github.com/D-Programming-Language/dmd/commit/0cd550b4d4655259ac69a676908e702d65cdc94f

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


[Issue 2953] tuple.length rejected as a tuple parameter in a static foreach

2011-08-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2953


Ellery Newcomer ellery-newco...@utulsa.edu changed:

   What|Removed |Added

 CC||ellery-newco...@utulsa.edu


--- Comment #1 from Ellery Newcomer ellery-newco...@utulsa.edu 2011-08-11 
18:51:10 PDT ---
Ran into something similar a while back, but I don't think foreach has anything
to do with it:

template Sequenced(){
template Inner(ThisNode, Value, size_t N){
}
}

struct IndexedBy(L...)
{
alias L List;
}

class MIC(IndexedBy){
alias int ThisNode;

void _RemoveAllBut(size_t N)(ThisNode* node){
}

/// disattach node from all indeces.
alias _RemoveAllBut!(IndexedBy.List.length) _RemoveAll;
}

void main(){
alias MIC!(IndexedBy!(Sequenced!())) C;
}



yields 1 error message:

Error: identifier 'length' of 'IndexedBy.List.length' is not defined

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


[Issue 2953] tuple.length rejected as a tuple parameter in a static foreach

2011-08-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2953



--- Comment #2 from Don clugd...@yahoo.com.au 2011-08-11 22:40:45 PDT ---
Reduced form of the test case in comment 1:
-
template Sequenced() {}

struct IndexedBy(L...) {
alias L List;
}

struct MIC(F){
int[F.List.length] w;
}

alias MIC!( IndexedBy!(Sequenced!()) ) C;
--
test3.d(14): Error: identifier 'length' of 'F.List.length' is not defined
test3.d(17): Error: template instance test3.MIC!(IndexedBy!(__T9SequencedZ))
err
or instantiating

Looks like a failure to resolve aliases, for a template which is a member of a
tuple.

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