convex
convex copied to clipboard
Error in argument compilation
There is an error which I guess comes from argument compilation. However, I don't know how the reader and parser work, so I can only show how to reproduce the error.
First, I define an actor with an eval callable function:
(def actor (deploy `(
defn eval ^{:callable? true} [code] (
if (= *caller* ~*address*)
(eval-as *address* code)
(fail :UNAUTHORIZED "access not granted")
)
)))
Then, I create a function that use a variable in actor, using the eval function
(call actor (eval `(
defn identity [arg] arg
)))
Finally, I run the function with some value
(actor/identity 1)
And instead of returning 1, it returns
(defn identity [arg] arg)
Interesting one. Let me check and get back on this!