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

super.merge on a getter generates a function call #211

Open
esb opened this issue Apr 28, 2024 · 3 comments
Open

super.merge on a getter generates a function call #211

esb opened this issue Apr 28, 2024 · 3 comments

Comments

@esb
Copy link

esb commented Apr 28, 2024

The merge of super on a getter function generates the wrong call.

class Test < Parent
  def self.options
    super.merge(opt1: 1)
  end
end

This generates

static get options() {
    return {
      ...Parent.options(),
      opt1: 1
    }
  };

This is wrong. The super should follow the args of the definition instead.

static get options() {
    return {
      ...Parent.options,
      opt1: 1
    }
  };
@jaredcwhite
Copy link
Member

@esb I have a feeling a fix for this could be tricky, but I'll see what I can do!

@esb
Copy link
Author

esb commented May 21, 2024

I have a fix for this together with the case where a getter requests a super call.

Would you like a PR?

@jaredcwhite
Copy link
Member

Would you like a PR?

Yes, that would be fantastic! I hadn't got a chance to look at it myself.

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