summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/03_bugs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/custom/03_bugs')
-rw-r--r--tests/custom/03_bugs/22_compiler_parenthesized_division19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/custom/03_bugs/22_compiler_parenthesized_division b/tests/custom/03_bugs/22_compiler_parenthesized_division
new file mode 100644
index 0000000..a70703f
--- /dev/null
+++ b/tests/custom/03_bugs/22_compiler_parenthesized_division
@@ -0,0 +1,19 @@
+When compiling a parenthesized division or division-assignment expression,
+the compiler didn't instruct the lexer to treat a potential subsequent
+slash as operand, leading to an incorrect syntax error exception.
+
+-- Expect stdout --
+0
+0
+0
+0
+-- End --
+
+-- Testcase --
+{%
+ print(a / 1, "\n"); // this was okay
+ print(a /= 1, "\n"); // okay too
+ print((a / 1), "\n"); // this failed
+ print((a /= 1), "\n"); // failed as well
+%}
+-- End --