<< 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
Fix Version/s: None

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


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 []

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

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 Tue Sep 19 06:50:20 CDT 2017 using JIRA 4.4#649-r158309.