Repository: swc-project/swc (rust)

Issue:
[Bug]: Chained assignment operator with field access of `super` during static field initialization
### Describe the bug

 A normal termination is expected but there is an invalid left-hand side in the output code.

### Input code

```typescript
class x { static x = super . x += super . x += 0 ; }
```


### Config

_No response_

### Playground link

https://play.swc.rs/?version=1.3.11&code=H4sIAAAAAAAAA0vOSSwuVqhQqFYoLkksyUwGMm0ViksLUosU9IBsbTSOgYK1Qi0Ad6xXZjQAAAA%3D&config=H4sIAAAAAAAAA0WMTQrEIAxG75K1286id5hDBCctFv9IUhgR714tlu7C915ehUMsrBUyshCPS0pU%2FMMKZAOKZZcVTNf6tKEXagYUeScdiiyd%2BZSEJjUQXHRbGSWbQmYSeRHG3T9m66GQfucYKmjJdAc%2F0N7G%2FHPynaLySe0Cj9ke9LUAAAA%3D

### Expected behavior

A normal termination is expected:
```console
$ node input.js
// terminates without error
```

### Actual behavior

The output code has an invalid left-hand side:
```console
$ node output.js
output.js:100
_defineProperty(x, "x", _update(_getPrototypeOf(x), "x", x, true)._ += _get(_getPrototypeOf(x), "x", x) += 0);
                                                                       ^

ReferenceError: Invalid left-hand side in assignment
    at Object.<anonymous> (/Users/p51lee/dev/esmeta-plrg/output.js:100:72)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.11.0
```

### Version

1.3.11 (default SWC playground)

### Additional context

_No response_

Pull request:
fix(es/compat): Chained assignment operator of super props
<!-- Note: CI script will automatically rebase your PR so please do not rebase unless required -->

<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->

**Description:**

<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->

**BREAKING CHANGE:**

<!--
If this PR introduces a breaking change, it must contain a notice for it to be included in the CHANGELOG. Add description or remove entirely if not breaking.

You may need to update `MIGRATION.md` for the breaking changes.
-->

**Related issue (if exists):**
- fix #6309 

Patch:
diff --git a/crates/swc_ecma_transforms_classes/src/super_field.rs b/crates/swc_ecma_transforms_classes/src/super_field.rs
index ffa8aa2095..74fac2113d 100644
--- a/crates/swc_ecma_transforms_classes/src/super_field.rs
+++ b/crates/swc_ecma_transforms_classes/src/super_field.rs
@@ -124,11 +124,11 @@ impl<'a> VisitMut for SuperFieldAccessFolder<'a> {
                 right,
                 ..
             }) if is_assign_to_super_prop(left) => {
-                right.visit_mut_children_with(self);
+                right.visit_mut_with(self);
                 self.visit_mut_super_member_set(n)
             }
             Expr::Assign(AssignExpr { left, right, .. }) if is_assign_to_super_prop(left) => {
-                right.visit_mut_children_with(self);
+                right.visit_mut_with(self);
                 self.visit_mut_super_member_update(n);
             }
             Expr::Call(CallExpr {


Test patch:
diff --git a/crates/swc/tests/fixture/issues-6xxx/6309/input/.swcrc b/crates/swc/tests/fixture/issues-6xxx/6309/input/.swcrc
new file mode 100644
index 0000000000..daa38ba90c
--- /dev/null
+++ b/crates/swc/tests/fixture/issues-6xxx/6309/input/.swcrc
@@ -0,0 +1,19 @@
+{
+    "jsc": {
+        "parser": {
+            "syntax": "ecmascript",
+            "jsx": false
+        },
+        "target": "es5",
+        "loose": false,
+        "minify": {
+            "compress": false,
+            "mangle": false
+        }
+    },
+    "module": {
+        "type": "es6"
+    },
+    "minify": false,
+    "isModule": true
+}
\ No newline at end of file
diff --git a/crates/swc/tests/fixture/issues-6xxx/6309/input/input.js b/crates/swc/tests/fixture/issues-6xxx/6309/input/input.js
new file mode 100644
index 0000000000..1b65599984
--- /dev/null
+++ b/crates/swc/tests/fixture/issues-6xxx/6309/input/input.js
@@ -0,0 +1,4 @@
+class x {
+    static x = super.x += super.x += 0;
+    static y = super.x = super.x += 0;
+}
diff --git a/crates/swc/tests/fixture/issues-6xxx/6309/output/input.js b/crates/swc/tests/fixture/issues-6xxx/6309/output/input.js
new file mode 100644
index 0000000000..2245485b69
--- /dev/null
+++ b/crates/swc/tests/fixture/issues-6xxx/6309/output/input.js
@@ -0,0 +1,11 @@
+import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
+import _define_property from "@swc/helpers/src/_define_property.mjs";
+import _get_prototype_of from "@swc/helpers/src/_get_prototype_of.mjs";
+import _set from "@swc/helpers/src/_set.mjs";
+import _update from "@swc/helpers/src/_update.mjs";
+var x = function x() {
+    "use strict";
+    _class_call_check(this, x);
+};
+_define_property(x, "x", _update(_get_prototype_of(x), "x", x, true)._ += _update(_get_prototype_of(x), "x", x, true)._ += 0);
+_define_property(x, "y", _set(_get_prototype_of(x), "x", _update(_get_prototype_of(x), "x", x, true)._ += 0, x, true));