The following code won't compile:
interface J(T) {}
class A : J!(int) {}
void foo(T)(J!(T) j) {}
void main()
{
A a = new A;
foo(a);
}
The error is:
foo(T) does not match any function template declaration.
And yet it does. Change main to
void main()
{
A a = new A;
foo(cast(J!(int))a);
}
and it compiles just fine. I contend that the explicit cast should not be necessary.
Comment #1 by caron800 — 2008-04-24T04:31:13Z
Increased severity to major, as this issue is blocking progress on Phobos development.
Comment #2 by dhasenan — 2009-02-22T20:25:20Z
This is related to #1715, I think -- at the very least, this would be a workaround for #1715 and #1714 if it worked.