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

assignment chain cause compatibility issue #2770

Closed
HerrCai0907 opened this issue Oct 17, 2023 · 0 comments · Fixed by #2773
Closed

assignment chain cause compatibility issue #2770

HerrCai0907 opened this issue Oct 17, 2023 · 0 comments · Fixed by #2773
Assignees

Comments

@HerrCai0907
Copy link
Member

Bug description

In Typescript, it will print

set 1
set 1

But In Assemblyscript, it will print

set 1
get
set 123

Which will cause compatibility issue when port code.

class X {
  get y() {
    console.log("get");
    return 123;
  }
  set y(z) {
    console.log("set", z);
  }
}

let x = new X();
x.y = x.y = 1;

Steps to reproduce

compile and execute below code in both ts and as

AssemblyScript version

v0.27.x

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