Skip to content

Commit 52f2c21

Browse files
authored
Fix issue with time failing to expand with macroexpand-all (#1144)
Hi, could you please consider patch to use an auto-gensym for the let binding in the `time` macro. It addresses #1143. I assumed here that a straight let binding was used inadvertently rather than an auto-gensym. No tests were included due to the simplicity of the fix. Thanks Co-authored-by: ikappaki <[email protected]>
1 parent 8fcc065 commit 52f2c21

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
* Fix a bug where `keyword` and `symbol` functions did not treat string arguments as potentially namespaced (#1131)
1717
* Fix a bug where `condp` would throw an exception if a result expression was `nil` (#1137)
1818
* Fix a bug where integer division which resulted in an integer would return a `fractions.Fraction` (#1140)
19+
* Fix a bug where `basilisp.core/time` would fail to expand with `macroexpand-all` in a nested macro call (#1143)
1920

2021
## [v0.3.2]
2122
### Added

src/basilisp/core.lpy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4078,11 +4078,11 @@
40784078
"Time the execution of ``expr``\\. Return the result of ``expr`` and print the time
40794079
execution took in milliseconds."
40804080
[expr]
4081-
`(let [start (perf-counter)]
4081+
`(let [start# (perf-counter)]
40824082
(try
40834083
(do ~expr)
40844084
(finally
4085-
(println (* 1000 (- (perf-counter) start)) "msecs")))))
4085+
(println (* 1000 (- (perf-counter) start#)) "msecs")))))
40864086

40874087
;;;;;;;;;;;;;;;;;;;;;;
40884088
;; Threading Macros ;;

0 commit comments

Comments
 (0)