ClojureScript

referred namespace is shadowed by argument name in whitespace mode

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
  • Environment:
    cljs 1934

Description

Under whitespace mode compilation, the argument named "bar" shadows the namespace "bar" in the compiled JS. Interestingly, this problem only occurs consistently when you compile clean; incremental compilation sometimes fixes it.

See attached project for example.

(ns bar)
(defn barFunction [x] (+ x 1))

(ns foo
  (:require [bar :refer [barFunction]]))
(defn ^:export fooFunction [bar]
  (barFunction bar))
  1. cljs-631-20131030.diff
    30/Oct/13 2:12 PM
    2 kB
    Travis Thieman
  2. shadow.tar.gz
    21/Oct/13 1:41 PM
    3.48 MB
    George Fraser
  3. shadow-with-let.tar.gz
    21/Oct/13 6:42 PM
    3.48 MB
    George Fraser

Activity

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: