summary refs log tree commit diff stats
path: root/tests/accept/run/tprecedence.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/accept/run/tprecedence.nim')
-rw-r--r--tests/accept/run/tprecedence.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/accept/run/tprecedence.nim b/tests/accept/run/tprecedence.nim
new file mode 100644
index 000000000..6b1b250a2
--- /dev/null
+++ b/tests/accept/run/tprecedence.nim
@@ -0,0 +1,11 @@
+discard """
+  output: "true"
+"""
+
+# Test the new predence rules
+
+proc `\+` (x, y: int): int = result = x + y
+proc `\*` (x, y: int): int = result = x * y
+
+echo 5 \+ 1 \* 9 == 14
+