Skip to content

Commit

Permalink
[babashka#363] metadata fn on var f fails if referring to f
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude authored and bbss committed Aug 18, 2020
1 parent d538c29 commit b1a1560
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/SCI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.1-alpha.2
0.1.1-alpha.3
2 changes: 1 addition & 1 deletion src/sci/impl/analyzer.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
(assoc acc name
(doto (vars/->SciVar nil (symbol (str cnn)
(str name))
(assoc (analyze ctx (meta name))
(assoc (meta name)
:name name
:ns @vars/current-ns
:file @vars/current-file))
Expand Down
1 change: 1 addition & 0 deletions test/sci/core_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
(is (= 1337 (eval* "(do (defn ^{:cool-meta (inc 1336)} foo
[x] (dec x))
(:cool-meta (meta #'foo)))")))
(is (= 1337 (eval* "(defn ^{:test (fn [] (g))} g [] 1337) ((:test (meta #'g)))")))
(testing "var contains location information which can be used by
clojure.repl/source to read relevant source lines (see babashka)"
(is (true?
Expand Down

0 comments on commit b1a1560

Please sign in to comment.