summary refs log tree commit diff stats
path: root/tests/run/tprecedence.nim
blob: 6b1b250a22e1a1159a604586ce118f636eadbd27 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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