[haXe] overloading parent with different type

cornel tcornel at gmail.com
Sat Apr 8 12:40:47 CEST 2006


this fails to compile:

class A{
public:
virtual int f(){return 0;}
};

class B:public A{
public:
std::string f(){return "hi";}
};

please note that A::f() is virtual;
things got clearer in my head, thanks for your responses.

cornel

On 4/8/06, Martin Wood <flashdev at relivethefuture.com> wrote:
> in a case like this java requires that the arguments are different, you cant
> differentiate just by return type.
>
>
> cornel wrote:
> > out of curiosity, does java allow it?
> >
>
> --
> haXe - an open source web programming language
> http://haxe.org
>



More information about the Haxe mailing list