Fix #1350: map clojure.lang.Var to sci.lang.Var

This commit is contained in:
Michiel Borkent 2022-09-05 20:59:29 +02:00
parent ef41365656
commit 18e19934d1
2 changed files with 5 additions and 1 deletions

View file

@ -594,7 +594,8 @@
(instance? java.util.Iterator v) (instance? java.util.Iterator v)
java.util.Iterator java.util.Iterator
;; keep commas for merge friendliness ;; keep commas for merge friendliness
,,,)))] ,,,)))
m (assoc m (list 'quote 'clojure.lang.Var) 'sci.lang.Var)]
m)) m))

View file

@ -829,6 +829,9 @@ true")))
(testing "for all public vars, ns/symbol from ns map matches metadata" (testing "for all public vars, ns/symbol from ns map matches metadata"
(is (empty? (bb nil (.getPath (io/file "test" "babashka" "scripts" "check_var_names.bb"))))))) (is (empty? (bb nil (.getPath (io/file "test" "babashka" "scripts" "check_var_names.bb")))))))
(deftest clojure-lang-var-mapping-test
(is (= :var (bb nil "(defprotocol Foo (foo [_])) (extend-protocol Foo clojure.lang.Var (foo [_] :var)) (foo #'inc)"))))
;;;; Scratch ;;;; Scratch
(comment (comment