Weird error when trying to use `≔` (\coloneq) as infix operator

#1

When overloading like this:

julia> ≔(a, b) = a==b
≔ (generic function with 1 method)

the following works just fine:

julia> ≔(3,2)
false

But I get a weird error when trying to use it as an infix-operator:

julia> 2≔3
ERROR: syntax: invalid syntax (≔ 2 3)

Is this even supposed to work? The error message looks more like a bug in Julia’s Lisp parser or maybe I’m missing something?

0 Likes