Else branch does not tighten scope to non-sequential


  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:


This error is related to the example longOptions.clj of CTYPE-102 and the derived hmap/big-options mentioned as CTYPE-99. I've prepared a new example to clearly show the issue.

The first function passes type-checking. However, it contains a redundant check on line 83 and a redundant base-case on line 85.

The second function does not pass the (check-ns) as it assumes that notifs can be a (seqable String). However, as this is the else-branch of line 112 (if (or (sequential? notifs) (seq? notifs) (vector notifs)) ... so the notifs can not be a (Seqable String) in this branch.

NOTE: core.typed does not know clojure.core/sequential? yet. Therefore the seq? and vector? tests are added too.

  1. failDerive1.clj
    19/Feb/14 1:48 AM
    6 kB
    Cees van Kemenade
  2. failDerive1a.clj
    20/Feb/14 9:50 AM
    9 kB
    Cees van Kemenade


Cees van Kemenade made changes -
Field Original Value New Value
Attachment failDerive1a.clj [ 12830 ]
Ambrose Bonnaire-Sergeant made changes -
Status Open [ 1 ] Resolved [ 5 ]
Resolution Completed [ 1 ]
Ambrose Bonnaire-Sergeant made changes -
Status Resolved [ 5 ] Closed [ 6 ]


Vote (0)
Watch (1)


  • Created: