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

Issues related to the property named get in the class (Part 2) #563

Closed
nabetti1720 opened this issue Aug 30, 2024 · 1 comment
Closed

Issues related to the property named get in the class (Part 2) #563

nabetti1720 opened this issue Aug 30, 2024 · 1 comment

Comments

@nabetti1720
Copy link
Contributor

I thought this issue was fundamentally the same problem as #296, so I created a new issue.

--
The following code is part of the code generated when ES2022 is specified for a bundler in the Javascript framework called hono. The code is kept to a minimum so that it can be reproduced.

// reproduction.js
var Hono = class {
  get;
  post;
  put;
  delete;
  options;
  patch;
  //...
}
% llrt reproduction.js
SyntaxError: invalid property name
  at reproduction.js:2:5

Specifying ES2020 generates the following code, which can also be executed by LLRT.

var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
//...
var _path2, _a3;
var Hono = (_a3 = class {
  constructor(options = {}) {
    __publicField(this, "get");
    __publicField(this, "post");
    __publicField(this, "put");
    __publicField(this, "delete");
    __publicField(this, "options");
    __publicField(this, "patch");
//...

EDIT: rquickjs is the latest from git.

rquickjs = { version = "0.6.2", git = "https://github.com/DelSkayn/rquickjs", ...

Issues against quickjs repositories are a hurdle for me, so I would appreciate it if someone could report this issue.

Originally posted by @nabetti1720 in #296 (comment)

@nabetti1720
Copy link
Contributor Author

The following comments provide the information we want to know, and we will close.

#296 (comment)

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

1 participant