Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot take value of macro #664

Closed
erdos opened this issue Jan 16, 2022 · 1 comment
Closed

Cannot take value of macro #664

erdos opened this issue Jan 16, 2022 · 1 comment

Comments

@erdos
Copy link
Contributor

erdos commented Jan 16, 2022

version: bb v0.7.3
platform: linux-amd64

problem:

Clojure does not allow to take value of macro, Babashka does. I have found the corresponding TODO: https://github.com/babashka/sci/blob/v0.2.8/src/sci/impl/resolve.cljc#L148

I expect it to be a simple change: The IVar has an isMacro method we can call in resolve-symbol:

(isMacro [this])

Consideration: what type of exception should be thrown in this case?

repro:

Just type -> in Babashka

expected behavior

Should throw exception with message:

Can't take value of a macro: #'clojure.core/->
@borkdude
Copy link
Collaborator

Thanks for reporting! Already fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants