Is it a compiler bug?

Marcin Kuszczak aarti at interia.pl
Tue Dec 12 14:36:56 PST 2006


Hello!

I would like to define two kinds of static opCall() in class like below:

static Any opCall(T)(T t) {
        return (new Any()).assign(t);
}

static Any opCall() {
        return new Any();
}

It seems for me properly coded (overloading should work as there is quite a
big difference between function taking no parameters and function taking
one parameter), but compiler complains:

..... : function Any.opCall conflicts with Any.opCall(T) at .....


Is it a compiler bug? Or maybe there is some workaround?

-- 
Regards
Marcin Kuszczak
(Aarti_pl)


More information about the Digitalmars-d-learn mailing list