<< Back to previous view

[CLJS-680] shadowing of js/foo Created: 15/Nov/13  Updated: 16/Nov/13  Resolved: 16/Nov/13

Status: Closed
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: David Nolen Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None


 Description   
(defn generic-report [f]
  (fn [msgs]
    (let [msgs (str msgs)]
      (f msgs))))

(defn alert [& msgs]
  ((generic-report js/alert) msgs))

This will result in an infinite loop, this is because the code generated by alert will create a local called alert, and js/alert also becomes alert in the generated code.



 Comments   
Comment by David Nolen [ 16/Nov/13 7:59 PM ]

fixed, https://github.com/clojure/clojurescript/commit/08b310f24b184d39082eac91b1d8a2dba7ae38af

Generated at Thu Jul 24 12:59:55 CDT 2014 using JIRA 4.4#649-r158309.