Skip to content

Commit

Permalink
Add tests for static static {}
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Apr 5, 2021
1 parent fb584ff commit 7cc5d28
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
@@ -0,0 +1,3 @@
class Foo {
static static {}
}
@@ -0,0 +1,38 @@
{
"type": "File",
"start":0,"end":32,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
"errors": [
"SyntaxError: Duplicate modifier: 'static'. (2:9)"
],
"program": {
"type": "Program",
"start":0,"end":32,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ClassDeclaration",
"start":0,"end":32,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
"id": {
"type": "Identifier",
"start":6,"end":9,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":9},"identifierName":"Foo"},
"name": "Foo"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start":10,"end":32,"loc":{"start":{"line":1,"column":10},"end":{"line":3,"column":1}},
"body": [
{
"type": "StaticBlock",
"start":14,"end":30,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":18}},
"static": true,
"body": []
}
]
}
}
],
"directives": []
}
}

0 comments on commit 7cc5d28

Please sign in to comment.