Re: class is forward referenced when looking for 'v'

2015-01-30 Thread Amber Thralll via Digitalmars-d-learn
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.

Re: class is forward referenced when looking for 'v'

2015-01-30 Thread Kenji Hara via Digitalmars-d-learn
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.

Re: class is forward referenced when looking for 'v'

2015-01-29 Thread David Monagle via Digitalmars-d-learn
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.