summary refs log blame commit diff stats
path: root/tests/lexer/tunicode_operators.nim
blob: 6ad40beab6578abc424cce4ce748c8c848533b54 (plain) (tree)
1
2
3
4
5
6
7
8
9






                                        

           
          
                  




              
#{.experimental: "unicodeOperators".}

proc `⊙`(x, y: int): int = x * y
proc `⊙=`(x: var int, y: int) = x *= y

proc `⊞++`(x, y: int): int = x + y

const a = 9

var x = 45
x ⊙= a⊞++4⊙3

var y = 45
y *= 9 + 4 * 3

assert x == y