[Issue 13772] New: template capture error

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Nov 24 07:44:46 PST 2014


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

          Issue ID: 13772
           Summary: template capture error
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: galaxylang at gmail.com

//more,now DMD implement follow two case no difference
//class    P(T:U!(V,X),alias U,V){}=======class    P(T:U!(V,X),alias U,V...){}


class U(V...)
{
}
class    P(T:U!(V,X),alias U,V,X,D=U!(V,X))
{
}


P!(U!(int,int,int,int)) p;

@property void opCall(P)(P)
{
  writeln(typeid(N));
}

P!(U!(int,int,int,int)) p;
p();

//output
//m.P!(U!(int, int, int, int), U, int, int, U!(int, int)).P

there also a problem that,as you can see 
@property void opCall(P)(P)
can work
@property void opDispatch(P,string op)(P)
but not run

--


More information about the Digitalmars-d-bugs mailing list