core.typed

pred does not create proper filters

Details

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

Description

Here is original example code to reproduce: https://gist.github.com/shepmaster/234a90b439e0585f0ec5

A smaller version is:

(def-alias Thing '{:thing Any})

(ann thing? (predicate Thing))
(def thing? (t/pred Thing))
Expected:       (Fn [Any -> Boolean :filters {:then (is Thing 0), :else (! Thing 0)}])

Actual:         (Fn [Any -> Boolean :filters {:then (is nil 0), :else (! nil 0)}])
in: (def thing? (clojure.core.typed/pred* (quote Thing) (quote typed.core) (fn* ([arg3662] (clojure.lang.RT/booleanCast ((clojure.core.typed.current-impl/hmap-c? :mandatory {:thing (fn* ([G__3663] true))\
} :optional {} :absent-keys #{} :complete? false) arg3662))))))

Activity

Hide
Jake Goulding added a comment -

I think this was fixed in commit ebaedae46704e40aa9479c457e88ca4536eeb232, released in 0.2.45.

Show
Jake Goulding added a comment - I think this was fixed in commit ebaedae46704e40aa9479c457e88ca4536eeb232, released in 0.2.45.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: