mirror of
https://github.com/danbulant/oxc
synced 2026-05-22 21:58:36 +00:00
Fix exponentiation operator transform to bail out early if a private class property.
We can't transform this:
```js
class C {
#p;
method() {
this.#p **= 2;
}
}
```
But we should at least leave it alone. Previously `get_obj_ref` called `ast.move_expression(expr)` on the member expression's object before bailing out, so example above was transformed to:
```js
class C {
#p;
method() {
null.#p **= 2; // <-- `null`
}
}
```
This PR makes it spot this case early and bail out *before* calling `ast.move_expression(expr)`.
|
||
|---|---|---|
| .. | ||
| ast_tools | ||
| benchmark | ||
| common | ||
| coverage | ||
| javascript_globals | ||
| lint_rules | ||
| minsize | ||
| prettier_conformance | ||
| rulegen | ||
| transform_checker | ||
| transform_conformance | ||
| website | ||