class Base
{
public void Foo(A a)
{
writeln("Base.Foo(A a)");
}
public void Foo(B a)
{
writeln("Base.Foo(B a)");
}
};
Compiler properly resolves forward references. Therefore, it's
definitely a compiler bug, and the template version should be
accepted.
On Friday, 30 January 2015 at 00:09:17 UTC, Amber Thralll wrote:
And the errors dmd returns:
test.d(16): Error: class test.A!int.A is forward referenced
when looking for 'v'
test.d(16): Error: class test.A!int.A is forward referenced
when looking for 'opDot'
test.d(16): Error: class test.A!int.
It's a bit hard to know where to start here. It's not obvious
from your code what you are trying to achieve.
In essence, you do have a circular reference as Base has
functions that use a types A and B which are derived from the
Base. I don't see how the complier could be asked to resolve this.