[Issue 1659] template alias parameters are chosen over all but exact matches.

2016-03-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1659

Kenji Hara  changed:

   What|Removed |Added

 CC||simen.kja...@gmail.com

--- Comment #8 from Kenji Hara  ---
*** Issue 4431 has been marked as a duplicate of this issue. ***

--


[Issue 1659] template alias parameters are chosen over all but exact matches.

2014-02-19 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=1659


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

   Keywords||pull
   Platform|x86 |All
 OS/Version|Linux   |All


--- Comment #6 from Kenji Hara k.hara...@gmail.com 2014-02-19 23:26:36 PST ---
https://github.com/D-Programming-Language/dmd/pull/3156

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 1659] template alias parameters are chosen over all but exact matches.

2014-02-03 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=1659


Vladimir Panteleev thecybersha...@gmail.com changed:

   What|Removed |Added

 CC||thecybersha...@gmail.com


--- Comment #4 from Vladimir Panteleev thecybersha...@gmail.com 2014-02-04 
00:32:36 EET ---
Still happens with 2.064. The typedef part is no longer relevant as the
language feature is going away, but the class hierarchy part remains.

Shorter test case:

class Foo { }
class Bar : Foo { }

void f(T : Foo)() { }
void f(alias T)() { assert(false); }

void main()
{
f!Bar();
}

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 1659] template alias parameters are chosen over all but exact matches.

2010-01-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1659


Witold Baryluk bary...@smp.if.uj.edu.pl changed:

   What|Removed |Added

 CC||bary...@smp.if.uj.edu.pl


--- Comment #3 from Witold Baryluk bary...@smp.if.uj.edu.pl 2010-01-24 
21:09:54 PST ---
This problem is still present in DMD 2.039.
It looks that from unknown reasons bug918 is solved (nobody comented what was
source of regression and dissapiring of it). Probably it is different aspect
here of template matching.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 1659] template alias parameters are chosen over all but exact matches.

2009-04-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1659





--- Comment #2 from g...@nwawudu.com  2009-04-03 16:04 ---
Including original attachment in this comments. Issue looks similar to BUG 918.

import std.stdio;

typedef char ctd;
class Foo { }
class Bar : Foo { }

void main()
{
Baz!(char)(); /* regular template version used only because
   * template alias parameters reject basic types. */
Baz!(ctd)(); // alias version used
Baz!(Foo)(); // Foo version used
Baz!(Bar)(); // alias version used
}

void Baz(T)()
{
writefln(regular template version called with , T.stringof);
}

void Baz(T : Foo)()
{
writefln(foo specialization called with , T.stringof);
}

void Baz(alias T)()
{
writefln(alias version called with , T.stringof);
}


--