Files
oxc-project__oxc/tasks/coverage/misc/fail/oxc-13323.js
overlookmotel fd3233cf95 fix(semantic): flag super in function inside ObjectExpression (#13325)
Fix #13323.

Make semantic raise errors for the following illegal `super` uses:

```js
o = {
  foo: function() {
    super.foo;
  },

  bar() {
    return function() {
      super.bar;
    };
  },

  [ function() { super.qux; } ]() {},

  get [ function() { super.bing; } ]() {},

  set [ function() { super.bong; } ](v) {},
};
```
2025-08-29 13:10:08 +00:00

18 lines
241 B
JavaScript

o = {
foo: function() {
super.foo;
},
bar() {
return function() {
super.bar;
};
},
[ function() { super.qux; } ]() {},
get [ function() { super.bing; } ]() {},
set [ function() { super.bong; } ](v) {},
};