Issue 128: Can't override dynamic methods
Status:  Fixed
Owner: ----
Closed:  Aug 2011
Reported by fab.anto...@gmail.com, Jul 15, 2011
What steps will reproduce the problem?
1. Create a haxe/cpp project

2. Paste the following code
class A {
    static function main() {
	new B();
    }    
    public function new() : Void {
        Lib.print(foo());
    }
    public dynamic function foo() : String {
        return "foo";
    }
}
class B extends A {
    public function new() {
        super();
    }
    public override function foo() : String {
        return "bar";
    }
}

3. Compile...


What is the expected output? What do you see instead?
The expected output should be 'bar' but instead I get 'foo'.


What version of the product are you using? On what operating system?
hxcpp revision 347
haxe revision 3847
windows vista x64
Jul 19, 2011
Project Member #1 gameh...@gmail.com
Yes, this is a tricky one because the pattern does not really match c++ very well - it is more like a "prototype language".  But it can be done I guess.
Aug 16, 2011
Project Member #2 gameh...@gmail.com
Actually, I had already implemented it, but with a bug.  It should now be fixed.
Status: Fixed