<< Back to previous view

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

Status: Closed
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: Completed Votes: 0
Labels: None


 Description   

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)


 Comments   
Comment by Ambrose Bonnaire-Sergeant [ 20/Jul/15 10:31 AM ]

I didn't check but this is probably fixed.

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

Ok, I went back and investigated.

There is a unit test proving this works, and we should close this.

However, this commented out test claims to be related
to CTYP-71 — this will be fixed in CTYP-249.

Generated at Wed Jul 29 06:37:49 CDT 2015 using JIRA 4.4#649-r158309.