digitalmars.D.bugs - [Issue 8129] New: Cannot deduce template function when using UFCS and having a delegate(T) as first argument and an empty function.
- d-bugmail puremagic.com (26/26) May 21 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8129
- d-bugmail puremagic.com (43/43) Jun 02 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8129
- d-bugmail puremagic.com (10/10) Jun 06 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8129
- d-bugmail puremagic.com (21/21) Jun 06 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8129
- d-bugmail puremagic.com (10/10) Jun 06 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8129
- d-bugmail puremagic.com (13/13) Jun 11 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8129
- d-bugmail puremagic.com (9/9) Dec 20 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8129
http://d.puremagic.com/issues/show_bug.cgi?id=8129 Summary: Cannot deduce template function when using UFCS and having a delegate(T) as first argument and an empty function. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: meh paranoici.org --- Comment #0 from meh. <meh paranoici.org> 2012-05-21 02:14:45 PDT --- Created an attachment (id=1108) Reduced testcase I'm getting this compilation error with the attached code. /tmp/lol.d(33): Error: template lol.lol does not match any function template declaration /tmp/lol.d(21): Error: template lol.lol cannot deduce template function from argument types !(B)(OMG,void) /tmp/lol.d(33): Error: template instance lol!(B) errors instantiating template -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 21 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8129 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Summary|Cannot deduce template |Cannot deduce template |function when using UFCS |function when inferring |and having a delegate(T) as |labmda parameters over |first argument and an empty |partially specialized IFTI |function. |call. --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2012-06-02 21:13:50 PDT --- This is not UFCS issue. Proper function call shows same errors. In my opinion, the cause of problem is the inference of lambda parameters over partially specialized IFTI call. ---- class X {} class A {} class B : A {} void foo(T : A)(X x) {} void foo(T : A)(X x, void function (T) block) {} void main() { auto x = new X; //x.foo!B((a){}); // UFCS version shows same errors foo!B(x, (a){}); // Error: template test.foo does not match any function template declaration // Error: template test.foo cannot deduce template function from argument types !(B)(X,void) // Error: template instance foo!(B) errors instantiating template // Call explicitly aliased symbol still not good. alias foo!B Lol; Lol(x, (a){}); // Error: template test.foo matches more than one template declaration, test.d(5):foo(T : A) and test.d(6):foo(T : A) // Error: function expected before (), not foo!(B) of type void // But, avoiding lambda parameter inference stops errors. foo!B(x); foo!B(x, (B b){}); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 02 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8129 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmdavisProg gmx.com --- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2012-06-06 04:25:11 PDT --- *** Issue 8202 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 06 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8129 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Cannot deduce template |Cannot deduce template |function when inferring |function when using |labmda parameters over |partially specified type in |partially specialized IFTI |function parameter |call. | --- Comment #3 from Kenji Hara <k.hara.pg gmail.com> 2012-06-06 04:29:01 PDT --- From issue 8202: void func(T, R)(R range, T value) {} void main() { ubyte[] buffer = [0, 1, 2]; func!ushort(buffer, 915); } This is partially specialized template function problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 06 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8129 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #4 from Kenji Hara <k.hara.pg gmail.com> 2012-06-06 04:43:16 PDT --- https://github.com/D-Programming-Language/dmd/pull/983 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 06 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8129 --- Comment #5 from github-bugzilla puremagic.com 2012-06-11 17:15:11 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4b7c17da9fe105ff46a2e816da7fabc976ab364f fix Issue 8129 - Cannot deduce template function when using partially specified type in function parameter https://github.com/D-Programming-Language/dmd/commit/8fa7bdd28f857cde150a40ff2afa600f809fcc52 Merge pull request #983 from 9rnsr/fix8129 Issue 8129 - Cannot deduce template function when using partially specified type in function parameter -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 11 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8129 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 20 2012