cursive-ide / cursive

Cursive: The IDE for beautiful Clojure code
582 stars 7 forks source link

Miss reference in defn arguments #266

Open fbellomi opened 10 years ago

fbellomi commented 10 years ago

In this snippet

(defn analyze-ns
  [source-nsym & {:keys [reader opt] :or {reader (pb-reader-for-ns source-nsym)}}]
  (let [source-path (munge-ns source-nsym)
        {:keys [analyze-results] :as m}
        (analyze-file source-path :reader reader :opt opt)]
    (assoc (dissoc m :forms :asts)
      :analyze-results {:source (slurp (io/resource source-path))
                        :namespace source-nsym
                        :forms (:forms m)
                        :asts (:asts m)})))

source-nsym in the :or map is marked as undefined

danielcompton commented 9 years ago

I can confirm this still happens in 0.1.58. A simpler reproduction case is

(defn mytest
  [source & {:keys [a b] :or {a (str source)}}]
  [source a b])

screenshot of intellij idea 26-07-15 11 33 48 am