<< Back to previous view

[CTYP-231] (Array X) is broken and undocumented Created: 23/Jun/15  Updated: 20/Jul/15

Status: Open
Project: core.typed
Component/s: Clojure Checker
Affects Version/s: None
Fix Version/s: Backlog

Type: Defect Priority: Blocker
Reporter: Marc O'Morain Assignee: Ambrose Bonnaire-Sergeant
Resolution: Unresolved Votes: 0
Labels: None


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.

Comment by Ambrose Bonnaire-Sergeant [ 23/Jun/15 8:26 AM ]

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.

Comment by Marc O'Morain [ 23/Jun/15 8:39 AM ]

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[] forms of the functions at present, so we should be OK for now.


Comment by Ambrose Bonnaire-Sergeant [ 23/Jun/15 8:50 AM ]

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.

Generated at Sat Sep 05 02:51:54 CDT 2015 using JIRA 4.4#649-r158309.