<< Back to previous view

[CTYP-71] Occurrence typing does not deal well with non-eagerly simplifying unions Created: 26/Sep/13  Updated: 26/Sep/13

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

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


Bug introduced in 0.2.11.

(cf (fn> [a :- (U nil (Nilable java.util.Date))]
(when a
(ann-form a java.util.Date))))

Type Error (clojure.core.typed:1:87) Local binding a expected type java.util.Date, but actual type (U (Nilable java.util.Date) nil)
in: a

Type Error (clojure.core.typed:1:87) Type mismatch:

Expected: java.util.Date

Actual: (U (Nilable java.util.Date) nil)
in: a

ExceptionInfo Type Checker: Found 2 errors clojure.core/ex-info (core.clj:4327)

Generated at Fri May 22 09:36:54 CDT 2015 using JIRA 4.4#649-r158309.