<< Back to previous view

[CLJS-544] named fn lexical scoping bug Created: 18/Jul/13  Updated: 27/Jul/13  Resolved: 19/Jul/13

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

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


 Description   
(fn [foo] (fn foo [] foo))

generates the following code

function (foo) {
    return (function foo() {
        return foo__$1;
    });
}


 Comments   
Comment by David Nolen [ 19/Jul/13 1:06 AM ]

It looks like the issue is that emit-fn-method in compiler.clj just emits :name from the fn AST, but this :name lack the shadow information present that we pass along via locals in parse fn* star case in analyzer.clj

Comment by David Nolen [ 19/Jul/13 8:06 AM ]

fixed http://github.com/clojure/clojurescript/commit/9ddf847b44ec82070e91038f4afbd8a2baec94ff

Generated at Sat Oct 25 06:30:49 CDT 2014 using JIRA 4.4#649-r158309.