<< Back to previous view

[CTYP-52] Heterogeneous Vector is not ISeqable in CLJS Created: 10/Sep/13  Updated: 20/Jul/15

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

Type: Defect Priority: Major
Reporter: Chris Frisz Assignee: Ambrose Bonnaire-Sergeant
Resolution: Unresolved Votes: 0
Labels: None
Environment:

ClojureScript 0.0-1859, Mac OS X 10.8.4



 Description   

Following code snipped exemplifies the error:

(ann update-first [(Vector* number number) number -> (Vector* number number)]) 
(defn update-first [my-vec new-first] (assoc my-vec 1 new-first))

Produces the following error when type-checking:

Type Error [file] Polymorphic function clojure.core/nth could not be applied to arguments:
Polymorphic Variables:
	x
	y

Domains:
	(U (cljs.core/ISeqable x) nil) int
	(U (cljs.core/ISeqable x) nil) int y

Arguments:
	chaser-cljs.coords/CoordsT (Value 1) nil

Ranges:
	x
	(U y x)

in: (clojure.core/nth vec__8823 1 nil)
in: (clojure.core/nth vec__8823 1 nil)


 Comments   
Comment by Ambrose Bonnaire-Sergeant [ 20/Jul/15 11:30 AM ]

This is probably fixed, but we need a test.

Generated at Tue Sep 01 09:18:11 CDT 2015 using JIRA 4.4#649-r158309.