D-Programming-Language/dmd — pull request #3156 by 9rnsr (2014-01-26 09:19:39+00:00)
Title: Issue 2025 - Inconsistent rules for instantiating templates with a tuple parameter

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

1. Adjust matching level for issue cases.
* `TemplateTupleParameter::matchArg` should always return `MATCHconvert` in order to have the lower priority than other non-tuple templates.
* `TemplateTypeParameter::matchArg` and `TemplateAliasParameter::matchArg` should return same match level (== MATCHconvert) for aggregate types.
* In leastAsSpecialized comparison, aggregate types should prefer template type parameter. For that, `TemplateAliasParameter::matchArg` should match to `tdummy`.

2. Add "dependent template parameter" concept
Their `matchArg` should return binary result - match or nomatch, in order to follow the match level of the corresponding precedent parameter.