Skip to content

Class with static initialization block highlighting issue #1254

Description

@blmatthews
class Test
{
    static
    {
        console.log('here');
    }
} // This is highlighted as an error. Removing the } on the previous line "fixes" it.

I tried a .vimrc that only does syntax enable and includes this plugin. I also tried various colorschemes. Neither made a difference. Wrapping it in some HTML as shown in the image below lets a browser load it without complaint and execute the console.log('here') (the console.log is there only to show the browser thinks it’s valid HTML and Javascript, the closing } is highlighted as an error even without the console.log line).

Screen Shot 2022-12-27 at 2 24 04 PM

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions