From 68be801f63dc41e79f96ef2516350cc8538c5d7e Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 9 Nov 2011 01:42:05 +0100 Subject: operator precedence changed: assignment like operators are supported; escaping of operators with \ is supported --- tests/accept/run/tprecedence.nim | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/accept/run/tprecedence.nim (limited to 'tests/accept/run/tprecedence.nim') 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 + -- cgit 1.4.1-2-gfad0