summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/04_bugs/08_compiler_arrow_fn_expressions
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-01-26 11:09:28 +0100
committerGitHub <noreply@github.com>2022-01-26 11:09:28 +0100
commit58e1da9b7dd69af0f32fb2a70c1808dce8c51733 (patch)
tree3150ccd20772ee2406d3024a9b930f6051f6c028 /tests/custom/04_bugs/08_compiler_arrow_fn_expressions
parent134f575064c8a454354aead852533104642d2d5a (diff)
parent3f6d1998b60e2778730a925d2b761db3b54979fe (diff)
Merge pull request #35 from jow-/various-fixes
Various fixes
Diffstat (limited to 'tests/custom/04_bugs/08_compiler_arrow_fn_expressions')
-rw-r--r--tests/custom/04_bugs/08_compiler_arrow_fn_expressions15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/custom/04_bugs/08_compiler_arrow_fn_expressions b/tests/custom/04_bugs/08_compiler_arrow_fn_expressions
new file mode 100644
index 0000000..5cd8960
--- /dev/null
+++ b/tests/custom/04_bugs/08_compiler_arrow_fn_expressions
@@ -0,0 +1,15 @@
+Arrow functions with single expression bodies were parsed with a wrong
+precedence level, causing comma expressions to be greedily consumed.
+
+-- Testcase --
+{%
+ print({
+ a: () => 1,
+ b: () => 2
+ }, "\n");
+%}
+-- End --
+
+-- Expect stdout --
+{ "a": "() => { ... }", "b": "() => { ... }" }
+-- End --