mirror of
https://github.com/danbulant/oxc
synced 2026-05-21 13:18:59 +00:00
Follow-on after #8482. Fix an edge case in arrow functions transform when inserting `_this = this` after `super()`. It is possible (though bizarre) for `super()` to contain another `super()` call. This will throw an error when evaluating the outer `super()`, but it can still be observable in some cases. ```js let f; class S {} class C extends S { constructor(x) { super(super(), this.x = x, f = async () => this); } } try { new C(123) } catch {} const c = await f(); assert(c.x === 123); ``` So, before bailing out from searching for more `super()`s in class constructor, visit the `super()` call's arguments. |
||
|---|---|---|
| .. | ||
| babel-plugin-transform-arrow-functions/test/fixtures | ||
| babel-plugin-transform-async-generator-functions/test/fixtures | ||
| babel-plugin-transform-async-to-generator/test/fixtures | ||
| babel-plugin-transform-class-properties/test/fixtures | ||
| babel-plugin-transform-class-static-block/test/fixtures | ||
| babel-plugin-transform-exponentiation-operator/test/fixtures | ||
| babel-plugin-transform-logical-assignment-operators/test/fixtures | ||
| babel-plugin-transform-nullish-coalescing-operator/test/fixtures | ||
| babel-plugin-transform-object-rest-spread/test/fixtures/object-rest | ||
| babel-plugin-transform-optional-catch-binding/test/fixtures | ||
| babel-plugin-transform-private-methods/test/fixtures | ||
| babel-plugin-transform-react-jsx/test/fixtures | ||
| babel-plugin-transform-react-jsx-source/test/fixtures/react-source | ||
| babel-plugin-transform-typescript/test/fixtures | ||
| babel-preset-typescript/test/fixtures/removeImportExtensions | ||
| regexp/test/fixtures | ||