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

David Nolen made changes -
Field Original Value New Value
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))
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.

{code}
(ns bar)
(defn barFunction [x] (+ x 1))

(ns foo
  (:require [bar :refer [barFunction]]))
(defn ^:export fooFunction [bar]
  (barFunction bar))
{code}
George Fraser made changes -
Attachment shadow-with-let.tar.gz [ 12353 ]
David Nolen made changes -
Assignee David Nolen [ dnolen ]
Travis Thieman made changes -
Attachment cljs-631-20131030.diff [ 12415 ]
David Nolen made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: