Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Commit

Permalink
Add tests for string literal get/set/async
Browse files Browse the repository at this point in the history
These should be treated as regular methods and not special get/set/async
behaviour.
  • Loading branch information
Qantas94Heavy committed Sep 2, 2017
1 parent fd5a730 commit 339b4fb
Show file tree
Hide file tree
Showing 10 changed files with 316 additions and 102 deletions.
@@ -0,0 +1,3 @@
class A {
["async"] a() {}
}
@@ -0,0 +1,3 @@
{
"throws": "Unexpected token (2:12)"
}
@@ -0,0 +1,3 @@
class A {
["get"] a() {}
}
@@ -0,0 +1,3 @@
{
"throws": "Unexpected token (2:10)"
}
@@ -0,0 +1,3 @@
class A {
"async" a() {}
}
@@ -0,0 +1,3 @@
{
"throws": "Unexpected token (2:10)"
}
@@ -0,0 +1,3 @@
class A {
"get" a() {}
}
@@ -0,0 +1,3 @@
{
"throws": "Unexpected token (2:8)"
}
12 changes: 11 additions & 1 deletion test/fixtures/es2015/class-methods/tricky-names/actual.js
Expand Up @@ -12,6 +12,16 @@ class A {
() {}


'get'
() {}

'set'
() {}

'async'
() {}


static
get
() {}
Expand Down Expand Up @@ -42,4 +52,4 @@ class A {
get
static
() {}
}
}

0 comments on commit 339b4fb

Please sign in to comment.