Fix #1384: allow .indexOf on LazySeq

This commit is contained in:
Michiel Borkent 2022-10-18 17:32:22 +02:00
parent b6f19b03dc
commit 351723fdb6
3 changed files with 6 additions and 1 deletions

View file

@ -11,6 +11,7 @@ A preview of the next release can be installed from
- feat: Honor `*print-namespace-maps*` in pprint ([@ghoseb](https://github.com/ghoseb))
- [#1369](https://github.com/babashka/babashka/issues/1369): provide `.sha256` files for every released asset
- [#1397](https://github.com/babashka/babashka/issues/1397): Add `clojure.lang.Namespace` as alias for `sci.lang.Namespace`, such that `(instance? clojure.lang.Namespace *ns*)` returns `true` in bb
- [#1384](https://github.com/babashka/babashka/issues/1384): allow `.indexOf` on `LazySeq`
## 0.10.163 (2022-09-24)

View file

@ -119,6 +119,8 @@
{:fields [{:name "EMPTY"}]}
clojure.lang.APersistentVector
{:methods [{:name "indexOf"}]}
clojure.lang.LazySeq
{:methods [{:name "indexOf"}]}
clojure.lang.ILookup
{:methods [{:name "valAt"}]}
clojure.lang.IPersistentMap
@ -517,7 +519,6 @@
clojure.lang.IPersistentVector
clojure.lang.ITransientVector
clojure.lang.Iterate
clojure.lang.LazySeq
clojure.lang.LispReader$Resolver
clojure.lang.Named
clojure.lang.Keyword

View file

@ -840,6 +840,9 @@ true")))
(deftest clojure-ns-test
(is (true? (bb nil "(instance? clojure.lang.Namespace *ns*)"))))
(deftest index-of-test
(is (= 1 (bb nil "(.indexOf (map inc [1 2 3]) 3)"))))
;;;; Scratch
(comment