tools.reader

tools.reader bug demonstrated when syntax quote contains map with key :val

Details

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

Description

Steps to reproduce with latest tools.reader 0.8.11:

user=> (require '[clojure.tools.reader :as tr])
nil
user=> (tr/read-string "(defn foo [x] `{:val x})")
UnsupportedOperationException count not supported on this type: Symbol  clojure.lang.RT.countFrom (RT.java:602)

From the partial investigation I've done so far, it appears this happens if a map inside of a syntax quote expression has a key :val. It looks like the wrong map is being passed to map-func, or even higher up the call stack, or perhaps map-func should be using coll in place of (:val coll).

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: