Bug 13772 – template capture error

Status
RESOLVED
Resolution
REMIND
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-11-24T15:44:46Z
Last change time
2023-02-20T15:04:57Z
Assigned to
No Owner
Creator
galaxylang

Comments

Comment #0 by galaxylang — 2014-11-24T15:44:46Z
//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
Comment #1 by galaxylang — 2014-11-24T15:50:24Z
//there are some copy problem //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)) { } @property void opCall(P)(P) { writeln(typeid(P)); } P!(U!(int,int,int,int)) p; p(); //output //m.P!(U!(int, int, int, int), U, int, int, U!(int, int)).P //D=T, //but now //D=U!(int,int) //T=U!(int, int, int, int) 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
Comment #2 by razvan.nitu1305 — 2023-02-20T15:04:57Z
This bug report is incomprehensible. Please reopen if you have a better description.