Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mock function fails for interface properties with haxe 3.2 compiler #48

Open
bjitivo opened this issue Jul 6, 2015 · 1 comment
Open

Comments

@bjitivo
Copy link

bjitivo commented Jul 6, 2015

Here is a small example:

import mockatoo.Mockatoo.*;
using mockatoo.Mockatoo;

interface IFoo
{
    var someVar(get, never) : Int;
}

class Foo
{
    public static function main()
    {
        mock(IFoo);
    }
}

The above fails when compiled with the haxe 3.2 compiler:

bji/bug_demo$ haxe -cpp Foo-cpp -main Foo -lib mockatoo
/usr/lib/haxe/lib/mockatoo/3,2,1/mockatoo/internal/MockMethod.hx:334: characters 44-52 : Warning : Usage of this typedef is deprecated
Foo.hx:7: characters 4-34 : Duplicate class field declaration : get_someVar
bji/bug_demo$ 

It appears that there is some issue with how the 3.2 compiler AST represents interface properties that is not working correctly with the mockatoo macros.

@bjitivo bjitivo changed the title mock function fails for interfaces with haxe 3.2 compiler mock function fails for interface properties with haxe 3.2 compiler Jul 6, 2015
@IBwWG
Copy link

IBwWG commented Feb 17, 2016

I'm experiencing this too on haxe 3.2.1/Win7x64 with mockatoo 3.2.1, using the code you provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants