<< Back to previous view

[CTYP-38] Core.typed doesn't understand inner class syntax inside non-nil-return Created: 30/Aug/13  Updated: 25/Sep/13  Resolved: 09/Sep/13

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

Type: Defect Priority: Minor
Reporter: Max Gonzih Assignee: Ambrose Bonnaire-Sergeant
Resolution: Completed Votes: 0
Labels: bug


 Description   

Following code snippet illustrates that non-nil-return call has no effect on recipient-type-to function.
Core.typed still assumes that Message$RecipientType/TO can return nil.

(non-nil-return javax.mail.Message$RecipientType/TO :all)

(ann recipient-type-to [-> Message$RecipientType])
(defn ^Message$RecipientType recipient-type-to []
  (Message$RecipientType/TO))

(comment
  Type mismatch:
  Expected:       (Fn [-> Message$RecipientType])
  Actual:         (Fn [-> (U Message$RecipientType nil)]))


 Comments   
Comment by Ambrose Bonnaire-Sergeant [ 09/Sep/13 3:45 AM ]

This is not an issue with inner class syntax.

This is rather about nilable fields. TO here is a static field, nilable-param only takes methods.

core.typed doesn't yet support overriding fields.

Comment by Ambrose Bonnaire-Sergeant [ 09/Sep/13 3:47 AM ]

Related: http://dev.clojure.org/jira/browse/CTYP-50

Generated at Mon Oct 20 06:42:01 CDT 2014 using JIRA 4.4#649-r158309.