packages/babel-plugin-proposal-decorators/test/fixtures/2022-03-misc--to-es2015/leaked-context-addInitializer/exec.js
raw symbols SCIP| 1 | let addInitializer; |
| 2 | |
| 3 | function callCapturedFunc() { |
| 4 | addInitializer(() => null); |
| 5 | } |
| 6 | |
| 7 | function decMethod(_, context) { |
| 8 | ({ addInitializer } = context); |
| 9 | addInitializer(() => null); |
| 10 | } |
| 11 | |
| 12 | expect(() => { |
| 13 | class C { |
| 14 | @callCapturedFunc |
| 15 | @decMethod |
| 16 | m() {} |
| 17 | } |
| 18 | }).toThrow('attempted to call addInitializer after decoration was finished') |