Skip to content

Add test for imported getters and setters #4270

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

Merged
merged 1 commit into from
Nov 17, 2024

Conversation

RunDevelopment
Copy link
Contributor

This PR just adds tests for imported getters and setters. It shows bugs that I want to fix.

  1. Renaming for static getters and setters does not work correctly. See that the setter is always called set_<name>.
  2. Static getters ignore the name set in the getter attribute. Same for setters.
  3. The code gen for static getters/setters is not correct. Note that they are called as functions.

I already have a fix ready for 1 and 2, but I wanted to add the tests before that PR, so that it's easier to see how the fix PR changes the existing code gen.

Copy link
Collaborator

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awful ...
Thank you for doing this!

@daxpedda daxpedda merged commit 5df8ebf into rustwasm:main Nov 17, 2024
41 checks passed
@daxpedda daxpedda mentioned this pull request Nov 17, 2024
@RunDevelopment RunDevelopment deleted the import-getter-setter-test branch November 17, 2024 08:34
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

Successfully merging this pull request may close these issues.

2 participants