packages/babel-plugin-proposal-destructuring-private/test/fixtures/assignment/nested/exec.js
raw| 1 | let result; |
| 2 | class C { |
| 3 | static #y = "y"; |
| 4 | static #z = "self"; |
| 5 | static #x; |
| 6 | static b = "b"; |
| 7 | static self = C; |
| 8 | static #self = C; |
| 9 | static { |
| 10 | let cloned, b, y, yy, yy2; |
| 11 | ({ #x: { [C.#z]: { b, #x: y = (C.b = "bb", C.#self.#y) }, #x: yy = (delete C.self, { ...cloned } = C, C.#y = "yy") } = C.#self, #y: yy2 } = C); |
| 12 | result = { b, y, yy, cloned, yy2 }; |
| 13 | } |
| 14 | } |
| 15 | expect(result).toStrictEqual({ |
| 16 | b: "b", |
| 17 | y: "y", |
| 18 | yy: "yy", |
| 19 | cloned: { b: "bb" }, |
| 20 | yy2: "yy" |
| 21 | }) |