Welcome! Please see the About page for a little more info on how this works.

0 votes
in core.typed by

There is no documentation about (Array X) in the API docs: http://clojure.github.io/core.typed/#clojure.core.typed - it was hard to find our that such a thing existed.

4 Answers

0 votes
by

Comment made by: ambrosebs

Unfortunately it's intentional. It's a long standing issue, one that I've thought long and hard about, but Arrays broken right now. The main problem is that there is no distinction between an array of boxed values and an array of unboxed values -- you can upcast from one the other.

I will put this near the top of the list of things to do.

0 votes
by

Comment made by: marc

We have a few uses of Array in our code-base. The few I have been touching today are for annotating clojure.java.io signatures. We don't use the byte(link: ) forms of the functions at present, so we should be OK for now.

Thanks

0 votes
by

Comment made by: ambrosebs

The implementation is fast and loose about the distinction of byte and Byte too -- they're pretty much identical, since Clojure does the appropriate coercions at runtime. Also be careful about that.

0 votes
by
Reference: https://clojure.atlassian.net/browse/CTYP-231 (reported by marc)
...