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

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. I

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

class is forward referenced when looking for 'v'

2015-01-29 Thread Amber Thralll via Digitalmars-d-learn
I ran into an issue with cross referencing to classes, that I can't figure out. I reproduced the issue below: import std.stdio; class Base(t) { public void Foo(A!(t) a) { writeln(Base.Foo(A a)); } public void Foo(B!(t) a) {