Static function conflicts with Non-Static?!

Namespace rswhite4 at googlemail.com
Sat Jun 2 01:06:56 PDT 2012


Is that a joke? :D

This Code throw the error, that a call of "Load" matches both 
functions.
How is that possible? Even in php that works fine. Any 
workarounds?
I can not believe that such a simple error still exists in D.

[code]
import std.stdio;

class Foo {
public:
	static Foo Load() {
		Foo f = new Foo();
		f.Load();

		return f;
	}

	void Load() {

	}
}

void main() {
	Foo f = Foo.Load();
}
[/code]


More information about the Digitalmars-d-learn mailing list