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

Support class static blocks #46

Open
tchetwin opened this issue Jul 13, 2021 · 0 comments
Open

Support class static blocks #46

tchetwin opened this issue Jul 13, 2021 · 0 comments

Comments

@tchetwin
Copy link
Collaborator

tchetwin commented Jul 13, 2021

The class static blocks proposal introduces a new lexical scope nested within a class body:

class C {
    static {
        throw new Error("foo");
    }
}

[email protected] has implemented this (currently) Stage 3 proposal. playground

We should investigate what changes, if any, need to be made to pasta to support this feature.


This currently shows in Chrome console:

VM56:3 Uncaught Error: foo
    at <static_initializer> (<anonymous>:3:15)
    at <anonymous>:1:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant