summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-12-01 12:10:05 +0100
committerJo-Philipp Wich <jo@mein.io>2021-12-01 12:10:05 +0100
commit07802f37ddb13489cfde314716ad6181dd9b1671 (patch)
tree0a119aafdbfdbdcc5fd7cf87f513c525c27e6d2a /tests
parent54ef6c09116430e5ce35777bd899f750d84e4dc1 (diff)
syntax: disallow keywords in object property shorthand notation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/custom/00_syntax/13_object_literals16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/custom/00_syntax/13_object_literals b/tests/custom/00_syntax/13_object_literals
index 18fbbed..5ceab43 100644
--- a/tests/custom/00_syntax/13_object_literals
+++ b/tests/custom/00_syntax/13_object_literals
@@ -128,6 +128,22 @@ In line 2, byte 14:
%}
-- End --
+-- Expect stderr --
+Syntax error: Invalid identifier
+In line 2, byte 8:
+
+ ` o = { function };`
+ ^-- Near here
+
+
+-- End --
+
+-- Testcase --
+{%
+ o = { function };
+%}
+-- End --
+
ES2015 computed property names are supported.