Summary: tuple.length rejected as a tuple parameter in a static
           Product: D
           Version: 1.042
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

This bug was created from Bug 2687.
Workaround (D2), change the foreach to enum args_length = args.length; foreach(
x ; Range!(args_length) ){ }


template Tuple(T...){
    alias T Tuple;
template Range(int b){
        alias Tuple!(1) Range;
void foo()(){
     Tuple!(int, int) args;
     foreach( x ; Range!(args.length) ){ }

void main(){
ice.d(411): Error: identifier 'length' of 'args.length' is not defined
ice.d(411): Error: template instance Range!(int) does not match template
tion Range(int b)
ice.d(411): Error: foreach: void is not an aggregate type
ice.d(416): Error: template instance!() error instantiating


Reply via email to