Skip to content

Commit 191798a

Browse files
committed
* remove hint for make-array, add test
1 parent dca338e commit 191798a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/main/cljs/cljs/core.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@
444444

445445
(declare apply)
446446

447-
(defn ^array make-array
447+
(defn make-array
448448
"Construct a JavaScript array of the specified dimensions. Accepts ignored
449449
type argument for compatibility with Clojure. Note that there is no efficient
450450
way to allocate multi-dimensional arrays in JavaScript; as such, this function

src/test/clojure/cljs/type_inference_tests.clj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,10 @@
318318
internal implementation uses standard JS APIs"
319319
(is (= 'boolean
320320
(env/with-compiler-env test-cenv
321-
(:tag (analyze test-env '(array? (array)))))))))
321+
(:tag (analyze test-env '(array? (array)))))))
322+
(is (= 'array
323+
(env/with-compiler-env test-cenv
324+
(:tag (analyze test-env '(make-array js/String. 10))))))))
322325

323326
(deftest test-always-true-if
324327
(is (= (env/with-compiler-env test-cenv

0 commit comments

Comments
 (0)