Closed
Description
Hi,
the basilisp.core/time
macro uses a straight start
let binding referenced in a try-catch block and as such is susceptible to errors when expanded by macroexpand-all
(see #1142)
To reproduce
- In the REPL create use
time
in a new macro definition and try to expand it withmacroexpand-all
, an error is thrown complaining about thestart
binding:
basilisp.user=> (require '[basilisp.walk :refer [macroexpand-all]])
nil
basilisp.user=> (defmacro abc [] `(time 5))
#'basilisp.user/abc
basilisp.user=> (macroexpand-all '(abc))
exception: <class 'basilisp.lang.compiler.exception.CompilerException'>
phase: :analyzing
message: unable to resolve symbol 'basilisp.core/start' in this context
form: basilisp.core/start
location: <Macroexpand>:NO_SOURCE_LINE
I believe the intention here was to use an auto-gensym all along.
Patch to follow.
Thanks
Metadata
Assignees
Labels
No labels