www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18572] New: AliasSeq default arguments are broken

https://issues.dlang.org/show_bug.cgi?id=18572

          Issue ID: 18572
           Summary: AliasSeq default arguments are broken
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: timon.gehr gmx.ch

DMD 2.079.0:

alias Seq(T...)=T;
void func(Seq!(int,int,int) args=Seq!(1,2,3)){ // ok
}
void main(){
    Seq!(int,int,int) args=Seq!(1,2,3); // ok
    func(); // error
    func(args); // ok
}

The code should compile.

--
Mar 07 2018