-
Notifications
You must be signed in to change notification settings - Fork 35.8k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugjavascriptJavaScript support issuesJavaScript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)Issue identified as 'upstream' component related (exists outside of VS Code)
Milestone
Description
The following code is valid ES6 code:
(function ()
{
class C {
static Foo()
{
console.log("Foo");
}
};
})();(jsconfig.json must specify the "ES6" target to understand the class syntax)
VS code underlines "static" in red and says "Modifiers cannot appear here". This is an incorrect error: it is valid ES6 syntax.
Note VS Code does not mark it as an error if the class is not wrapped in an IIFE, but these are typically used for encapsulation.
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugjavascriptJavaScript support issuesJavaScript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)Issue identified as 'upstream' component related (exists outside of VS Code)