Uploaded image for project: 'ClojureScript'
  1. CLJS-2823

Private var use not detected in multi-arity defn

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: None
    • Fix versions: None
    • Labels:
      None
    • Environment:

      {:deps {org.clojure/clojurescript {:git/url "https://github.com/clojure/clojurescript" :sha "17b71461ee6304e3696e397add1f4780525553fc"}}}

      Description

      Note that the last form in the repro below does not emit a diagnostic, while the previous does:

      $ clj -Srepro -m cljs.main
      cljs.user=> (defn- foo [])
      #'cljs.user/foo
      cljs.user=> (ns bar.core)
      
      bar.core=> (defn baz ([] (cljs.user/foo)))
      WARNING: var: cljs.user/foo is not public at line 1 <cljs repl>
      #'bar.core/baz
      bar.core=> (defn quux ([] (cljs.user/foo)) ([x] (cljs.user/foo)))
      #'bar.core/quux
      bar.core=>
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mfikes Mike Fikes
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: