[Issue 2025] Inconsistent rules for instantiating templates with a tuple parameter

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 1 04:16:56 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=2025



--- Comment #6 from Stewart Gordon <smjg at iname.com> 2012-02-01 04:16:53 PST ---
(In reply to comment #5)
> As Walter said, so that T:int would be considered a better match.  It is a hack
> in the compiler that I'm not particularly fond of.

What has a "better match" to do with anything?  (int) matches the pattern (T)
perfectly - no conversion, implicit or explicit.  True, (T: int) is a more
specialised match, but that doesn't magically render the match with (T)
inexact.

> See issue 4953 for another case it causes problems.

That's different - 5 is an int, so it doesn't exactly match the pattern (short
x).

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


More information about the Digitalmars-d-bugs mailing list