-
In nickel repl, either of the above code results in "error: unexpected token" pointing at the ".". Since in the documentation "." is described as an operator, and "all infix operators can be turned into functsion by putting them inside parentheses", I wonder if this is a bug or does "." gets special treatment? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I don't think this is on purpose. So, at first sight, I would say it's an overlook because |
Beta Was this translation helpful? Give feedback.
I think one issue is that we encode
StaticAccess
as a unary op with a fixed field name, not as a binary op. That is,x.foo
gets encoded as the unary op(.foo)
applied tox
. Probably the easiest solution would be to interpret(.)
asDynAccess
instead.