oxc/tasks/transform_conformance/snapshots
overlookmotel ccb7bdcc56 fix(transformer): exponentiation transform: do not replace object when private property (#6313)
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)`.
2024-10-06 23:08:08 +00:00
..
babel.snap.md fix(transformer): exponentiation transform: fix duplicate symbols (#6300) 2024-10-06 00:51:28 +00:00
babel_exec.snap.md test(transformer): move transformer conformance snapshots into separate directory (#5917) 2024-09-20 10:25:17 +00:00
oxc.snap.md fix(transformer): exponentiation transform: do not replace object when private property (#6313) 2024-10-06 23:08:08 +00:00
oxc_exec.snap.md test(transformer): move transformer conformance snapshots into separate directory (#5917) 2024-09-20 10:25:17 +00:00