-
-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Labels
component:basilisp.coreIssue pertaining to basilisp.core namespaceIssue pertaining to basilisp.core namespaceissue-type:bugSomething isn't workingSomething isn't working
Description
Hi,
there's an issue when trying to construct a case
form inside a macro with the test constants being in a sequence, the test constants are not considered
ValueError: No case clause matches :5
To reproduce,
Open up the REPL and write a macro that uses a sequence as a matching test constant and call it, it throws the above error
basilisp.user=> (defmacro issue [] `(case :5 ~(seq [:5]) 6))
#'basilisp.user/issue
basilisp.user=> (issue)
Traceback (most recent call last):
File "C:\src\basilisp\src\basilisp\cli.py", line 583, in repl
result = eval_str(lsrc, ctx, ns, eof)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\src\basilisp\src\basilisp\cli.py", line 54, in eval_str
last = compiler.compile_and_exec_form(form, ctx, ns)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\src\basilisp\src\basilisp\lang\compiler\__init__.py", line 189, in compile_and_exec_form
exec(bytecode, ns.module.__dict__) # pylint: disable=exec-used # nosec 6102
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<REPL Input>", line 1, in <module>
ValueError: No case clause matches :5
The same works in Clojure
user=> (defmacro issue [] `(case :5 ~(seq [:5]) 6))
#'user/issue
user=> (issue)
6
Thanks
Metadata
Metadata
Assignees
Labels
component:basilisp.coreIssue pertaining to basilisp.core namespaceIssue pertaining to basilisp.core namespaceissue-type:bugSomething isn't workingSomething isn't working