parent
8a8c2dcb46
commit
ef50677275
3 changed files with 20 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ A preview of the next release can be installed from
|
||||||
- Bump rewrite-clj to v0.1.1.47
|
- Bump rewrite-clj to v0.1.1.47
|
||||||
- [#1619](https://github.com/babashka/babashka/issues/1619): Fix reflection issue with `Thread/sleep` in `core.async/timeout`
|
- [#1619](https://github.com/babashka/babashka/issues/1619): Fix reflection issue with `Thread/sleep` in `core.async/timeout`
|
||||||
- Support interop on `java.util.stream.IntStream`
|
- Support interop on `java.util.stream.IntStream`
|
||||||
|
- [#1513](https://github.com/babashka/babashka/issues/1513): Fix interop on `Thread/sleep` with numbers that aren't already longs
|
||||||
|
|
||||||
## 1.3.184 (2023-08-22)
|
## 1.3.184 (2023-08-22)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -644,7 +644,19 @@
|
||||||
([_# ^String class-name#]
|
([_# ^String class-name#]
|
||||||
(Class/forName class-name#))
|
(Class/forName class-name#))
|
||||||
([_# ^String class-name# initialize# ^java.lang.ClassLoader clazz-loader#]
|
([_# ^String class-name# initialize# ^java.lang.ClassLoader clazz-loader#]
|
||||||
(Class/forName class-name#)))}))]]
|
(Class/forName class-name#)))})
|
||||||
|
(= 'java.lang.Thread c)
|
||||||
|
(assoc :static-methods
|
||||||
|
{(list 'quote 'sleep)
|
||||||
|
`(fn
|
||||||
|
([_# x#]
|
||||||
|
(if (instance? Number x#)
|
||||||
|
(let [x# (long x#)]
|
||||||
|
(Thread/sleep x#))
|
||||||
|
(let [^java.time.Duration x# x#]
|
||||||
|
(Thread/sleep x#))))
|
||||||
|
([_# ^java.lang.Long millis# ^java.lang.Long nanos#]
|
||||||
|
(Thread/sleep millis# nanos#)))}))]]
|
||||||
c))
|
c))
|
||||||
m (assoc m :public-class
|
m (assoc m :public-class
|
||||||
(fn [v]
|
(fn [v]
|
||||||
|
|
|
||||||
|
|
@ -44,3 +44,9 @@
|
||||||
|
|
||||||
(deftest IntStream-test
|
(deftest IntStream-test
|
||||||
(is (pos? (bb nil "(.count (.codePoints \"woof🐕\"))"))))
|
(is (pos? (bb nil "(.count (.codePoints \"woof🐕\"))"))))
|
||||||
|
|
||||||
|
(deftest Thread-sleep-test
|
||||||
|
(is (bb nil "(Thread/sleep (/ 1 200))
|
||||||
|
(Thread/sleep (/ 1 200) (/ 1 200))
|
||||||
|
(Thread/sleep (java.time.Duration/ofMillis 1))
|
||||||
|
true")))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue