core.typed

Assertion error in abo

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

[10:29:10] hugod: I'm getting "AssertionError Assert failed: (symbol? y) clojure.core.typed.check/abo/lookup--34688 (check.clj:2906)" - trying to work out what abo does...
[10:31:00] ambrosebs: hugod: IIRC it's "abstract object"
[10:31:40] ambrosebs: hugod: it's how we abstract an "object" in the occurrence typing sense from a local name (symbol) to a position arg
[10:32:13] ambrosebs: ie. how we convert (fn [a] a) into (All [x] [x -> x :object {:id 0}])
[10:32:32] ambrosebs: hugod: unsure of where the error is coming from tho
[10:33:04] hugod: this is what it is checking https://www.refheap.com/19405
[10:34:50] hugod: at least that is what is at the last line number reported by :trace true

Activity

Hide
Greg Hawkins added a comment -

The following minimal example causes this error for me:

(ann minimal [Keyword -> [Any -> Any]])
(defn minimal [kw]
  (fn [b]
    b))

Whereas the following doesn't:

(ann minimal [Keyword -> [Any -> Any]])
(defn minimal [kw]
  (fn [b]
    nil))
Show
Greg Hawkins added a comment - The following minimal example causes this error for me:
(ann minimal [Keyword -> [Any -> Any]])
(defn minimal [kw]
  (fn [b]
    b))
Whereas the following doesn't:
(ann minimal [Keyword -> [Any -> Any]])
(defn minimal [kw]
  (fn [b]
    nil))
Hide
Ambrose Bonnaire-Sergeant added a comment -
Show
Ambrose Bonnaire-Sergeant added a comment - Thanks Greg, made fixing this easy. Fixed https://github.com/clojure/core.typed/commit/15684f8a9de37237194a9c79ec7440606f48434f
Ambrose Bonnaire-Sergeant made changes -
Field Original Value New Value
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Ambrose Bonnaire-Sergeant made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: