Zulip Chat Archive

Stream: general

Topic: reflect bool


Simon Hudon (Aug 03 2018 at 06:26):

I'm running the following code:

run_cmd eval_expr bool (reflect tt) >>= trace

bool has an instance of has_reflect and the above is type correct but when I run it I get the following error:

VM does not have code for 'bool.tt'

What can I do?

Mario Carneiro (Aug 03 2018 at 10:13):

There is definitely a bug somewhere in the workings of eval_expr

Mario Carneiro (Aug 03 2018 at 10:14):

workaround:

run_cmd eval_expr bool (reflect (id tt)) >>= trace

Minchao Wu (Aug 03 2018 at 10:14):

looks like magic

Simon Hudon (Aug 03 2018 at 13:40):

Thanks! I was able to use this trick with user_attribute.get_param_untyped to replace user_attribute.get_param

Simon Hudon (Aug 03 2018 at 13:41):

(by wrapping the return with id: to_expr ``(id %%r))


Last updated: Dec 20 2023 at 11:08 UTC