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

Member getter / setter in zc #144

Open
2 tasks
kindlich opened this issue Jun 1, 2024 · 0 comments
Open
2 tasks

Member getter / setter in zc #144

kindlich opened this issue Jun 1, 2024 · 0 comments
Labels
bug Something isn't working CraftTweaker All Issues that are needed by CraftTweaker parser
Milestone

Comments

@kindlich
Copy link
Member

kindlich commented Jun 1, 2024

The language offers Operator Kinds for MEMBER_SETTER and MEMBER_GETTER.
However, currently they are not parsed properly, therefore we want to create and fix a simple test to test them (or maybe two test cases that each test one of them).

Acceptance criteria:

  • Test for member-getter passes
  • Test for member-setter passes

The Test case should look like this:

#output: value for Hello
#output: Setting this['Hello'] = 'World'

public class MyClass {
    private val values = {} as string[string];

    public .(member: string): string => "value for " + member;

    public .=(member: string, value: string): void => println("Setting this." + member + " = '" + value + "';
}

var cls = new MyClass();
println(cls.Hello);
cls.Hello = "World";
@kindlich kindlich added bug Something isn't working parser CraftTweaker All Issues that are needed by CraftTweaker labels Jun 1, 2024
@kindlich kindlich added this to the v1.0.0 milestone Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CraftTweaker All Issues that are needed by CraftTweaker parser
Projects
None yet
Development

No branches or pull requests

1 participant