Skip to content

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

Closed
@lpetre

Description

@lpetre

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions