<< Back to previous view

[CTYP-212] Can't create a promise of type (t/Val nil) Created: 20/Apr/15  Updated: 20/Apr/15  Resolved: 20/Apr/15

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

Type: Defect Priority: Major
Reporter: Timo Mihaljov Assignee: Ambrose Bonnaire-Sergeant
Resolution: Not Reproducible Votes: 0
Labels: None
Environment:

[org.clojure/core.typed "0.2.84"]
[org.clojure/clojure "1.6.0"]



 Description   

I can create a promise returning the constant 123

(defn foo []
  (t/let [x :- (t/Promise (t/Val 123)) (promise)]))
; :ok

but not a promise returning the constant nil

(defn bar []
  (t/let [x :- (t/Promise (t/Val nil)) (promise)]))
; Type Error (reiska/ui.clj:66:40) Polymorphic function promise could not be applied to arguments:
; Polymorphic Variables:
;         x
;
; Domains:
;
;
; Arguments:
;
;
; Ranges:
;         (t/Promise x)
;
; with expected type:
;         (t/Promise nil)
;
; in: (promise)
; in: (promise)


 Comments   
Comment by Timo Mihaljov [ 20/Apr/15 11:36 PM ]

I hit the save button too soon. I couldn't reproduce this in a clean project, so there's something else going on in my project that's causing this. I might reopen the issue once I've narrowed down what's causing it.





Generated at Tue Apr 21 08:19:22 CDT 2015 using JIRA 4.4#649-r158309.