Skip to content

Commit 65ed7e2

Browse files
committed
test - add failing test for class with method named static
1 parent d61ed46 commit 65ed7e2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ test('supports class static properties', function (t) {
125125
t.end()
126126
})
127127

128+
test('supports class function named static', function (t) {
129+
t.doesNotThrow(function () {
130+
acorn.parse('class X { static () {} }', { sourceType: 'script' })
131+
})
132+
t.end()
133+
})
134+
128135
test('supports private class static properties', function (t) {
129136
t.doesNotThrow(function () {
130137
acorn.parse('class X { static #x = y }', { sourceType: 'script' })

0 commit comments

Comments
 (0)