www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14899] New: NewExpression does not recognize tuple indexing

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

          Issue ID: 14899
           Summary: NewExpression does not recognize tuple indexing
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: k.hara.pg gmail.com

Test case:

alias TypeTuple(T...) = T;

void main()
{
    alias A = TypeTuple!(Object);
    auto o = new A[0]();
}


output:
test.d(6): Error: new can only create structs, dynamic arrays or class objects,
not (Object)'s

--
Aug 10 2015