Bug 8184 – problem with tuple argument deduction

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-06-02T00:57:53Z
Last change time
2024-12-13T18:00:19Z
Assigned to
No Owner
Creator
Zhenya Chapovsky
Moved to GitHub: dmd#18445 →

Comments

Comment #0 by zheny — 2012-06-02T00:57:53Z
this work class Bind(alias indeces) { static if(is(typeof(indeces) : int[])) { static auto opCall(D,V...)(D dg,V values) { static if(is(D d : R delegate(U), R, U...) && is(V == Combination!(indeces,ParameterTypeTuple!D))) { static if(indeces.length > 1) return Bind!(update!(indeces,indeces[0])[1..$])(Curry!(indeces[0])(dg,values[0]),values[1..$]); else return Curry!(indeces[0])(dg,values[0]); } } } } while this doesn't work class Bind(alias indeces) { static if(is(typeof(indeces) : int[])) { static auto opCall(R,U...)(R delegate(U) dg,Combination!(U) values) { static if(indeces.length > 1) return Bind!(update!(indeces,indeces[0])[1..$])(Curry!(indeces[0])(dg,values[0]),values[1..$]); else return Curry!(indeces[0])(dg,values[0]); } } }
Comment #1 by hsteoh — 2019-02-06T22:51:40Z
Tested on latest DMD (v2.084.0-395-gcb3a72613). Could not reproduce problem. Please provide more details, what does it mean "does not work"? Compile error? Runtime error? Wrong semantics? Also, please provide a full compilable/runnable code, since from the given code it's not clear which instantiation parameters causes it to fail.
Comment #2 by robert.schadek — 2024-12-13T18:00:19Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18445 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB