--- Comment #3 from Don <> 2010-09-03 01:45:03 PDT ---
It seems to be just luck that this ever worked at all. Template parameter
deduction has never worked for base classes or interfaces of a class. So
although this particular case used to work, it was very fragile -- very closely
related cases would fail.

I've only been able to fix this by implementing template parameter deduction
for base classes. It allows them as a "match with implicit conversion".

Thus, it also fixes bug 1715 "Template specialization checks for equality
rather than convertibility" and bug 1970 "Templated interfaces not matched".
But I've found a very annoying case:

interface I(X) {}
class C: I!(char), I!(double) {}

void foo(T)(I!(T) x) {}

void main()
   C c = new C;
   foo(c);      // could match with I!char or I!double

This should be treated as a match-with-implicit-conversion for c, but the type
T has not been determined, so template instantiation should fail. 
If the signature is instead:  foo(T)(I!(T) x, T y){}  and called with foo(c,
1.2), then instantiation should succeed.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to