www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - std.typecons.Tuple regression?

The following code used to compile with DMD 2.063.2:

import std.typecons;

struct Foo
     alias Tuple!(int) NEW_ARGS;

     NEW_ARGS args;

     void foo ()
         static if (NEW_ARGS.length == 1) {}

But compiling the above code with DMD 2.064.2 results in this error:

typecons.d(389): Error: this for _expand_field_0 needs to be type Tuple 
not type Foo

Am I doing something wrong or is this a regression? If I do any of the 
following the code will compile:

* Move the static-if outside of "foo"
* Replace "NEW_ARGS.length" with "args.length" in the static-if

/Jacob Carlborg
Nov 25 2013