Fix #1743: fix fully qualified instance method in call pos. with GraalVM 22 (#1744)

This commit is contained in:
Michiel Borkent 2024-10-12 10:41:45 +02:00 committed by GitHub
parent 1d5a777b81
commit 34b5e71465
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 19 additions and 2 deletions

View file

@ -7,6 +7,10 @@ A preview of the next release can be installed from
[Babashka](https://github.com/babashka/babashka): Native, fast starting Clojure interpreter for scripting
## Unreleased
- [#1743](https://github.com/babashka/babashka/issues/1743): fix new fully qualified instance method in call position with GraalVM 22
## 1.12.193 (2024-10-11)
- Clojure 1.12 interop: method thunks, FI coercion, array notation (see below)

View file

@ -20,7 +20,7 @@
"impl-java/src"],
:deps {org.clojure/clojure {:mvn/version "1.12.0"},
org.babashka/sci {:local/root "sci"}
org.babashka/babashka.impl.java {:mvn/version "0.1.8"}
org.babashka/babashka.impl.java {:mvn/version "0.1.10"}
org.babashka/sci.impl.types {:mvn/version "0.0.2"}
babashka/babashka.curl {:local/root "babashka.curl"}
babashka/fs {:local/root "fs"}

2
sci

@ -1 +1 @@
Subproject commit 09589dd37aa762ba1a416582a4d020deb9c612a4
Subproject commit 55a76e540c5ce65d8a61982b2f942fcf63776850

View file

@ -75,3 +75,16 @@
(= '(100 100 100 100 100) (->> (Stream/generate (constantly 100)) stream-seq! (take 5)))")))
(is (true? (bb nil "(import [java.util Collection] [java.util.stream Stream] [java.util.function Predicate])
(= '(1 2 3 4 5 6 7 8 9 10) (->> (Stream/iterate 1 inc) stream-seq! (take 10)))"))))
(deftest regression-test
(is (true? (bb nil "(let [x \"f\"] (String/.startsWith \"foo\" x))"))))
(deftest clojure-1_12-interop-test
(is (= [1 2 3] (bb nil "(map Integer/parseInt [\"1\" \"2\" \"3\"])")))
(is (= [1 2 3] (bb nil "(map String/.length [\"1\" \"22\" \"333\"])")))
(is (= ["1" "22" "333"] (bb nil "(map String/new [\"1\" \"22\" \"333\"])")))
(is (= 3 (bb nil "(String/.length \"123\")")))
(is (= "123" (bb nil "(String/new \"123\")"))))
(deftest clojure-1_12-array-test
(is (true? (bb nil "(instance? Class long/1)"))))