Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected error from addInitializer called after decorator throws #22264

Open
nicolo-ribaudo opened this issue Feb 5, 2024 · 4 comments
Open
Labels
bug Something isn't working correctly swc related to swc (bundling/transpiling) upstream Changes in upstream are required to solve these issues

Comments

@nicolo-ribaudo
Copy link

nicolo-ribaudo commented Feb 5, 2024

Version: Deno 1.40.3

let addInitializer;
function dec(_, ctx) { throw { addInitializer } = ctx; }
try { class A { @dec m() {} } } catch {}

addInitializer(() => {});

The addInitializer(() => {}) call should not throw according to the proposal spec, but it does in Deno.

@bartlomieju
Copy link
Member

Possibly related to swc-project/swc#8525

@bartlomieju bartlomieju added bug Something isn't working correctly swc related to swc (bundling/transpiling) labels Feb 5, 2024
@nicolo-ribaudo
Copy link
Author

No this is different :) (but that issue seems to be about the same as #22253).

In this case the function is present, but it doesn't behave properly.

@bartlomieju
Copy link
Member

Ooops, thanks!

@lucacasonato
Copy link
Member

Upstream: swc-project/swc#9078

@lucacasonato lucacasonato added the upstream Changes in upstream are required to solve these issues label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly swc related to swc (bundling/transpiling) upstream Changes in upstream are required to solve these issues
Projects
None yet
Development

No branches or pull requests

3 participants