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

A protected setter on a property causes hxcs/net-lib to generate invalid C# #19

Closed
lpetre opened this issue Jun 12, 2015 · 1 comment
Closed

Comments

@lpetre
Copy link
Contributor

lpetre commented Jun 12, 2015

I've done an example and write up here: https://github.com/lpetre/tripping-avenger/tree/master

A protected setter on a C# property makes hxcs/net-lib generate invalid C#:

This:

  trace(test.Working);
  trace(test.Broken);

Becomes:

    global::haxe.Log.trace.__hx_invoke2_o(((double) (test.Working) ), global::haxe.lang.Runtime.undefined, default(double), new global::haxe.lang.DynamicObject(new int[]{302979532, 1547539107, 1648581351}, new object[]{"main", "Main", "Main.hx"}, new int[]{1981972957}, new double[]{((double) (7) )}));
    global::haxe.Log.trace.__hx_invoke2_o(((double) (test.get_Broken()) ), global::haxe.lang.Runtime.undefined, default(double), new global::haxe.lang.DynamicObject(new int[]{302979532, 1547539107, 1648581351}, new object[]{"main", "Main", "Main.hx"}, new int[]{1981972957}, new double[]{((double) (8) )}));

test.get_Broken() fails to compile with the error:

error CS0571: `Test.Broken.get': cannot explicitly call operator or accessor
@waneck
Copy link
Member

waneck commented Jun 15, 2015

Fixed as reported at HaxeFoundation/haxe#4325

@waneck waneck closed this as completed Jun 15, 2015
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