ClojureScript

named fn lexical scoping bug

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

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

generates the following code

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

Activity

Hide
David Nolen added a comment - - edited

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

Show
David Nolen added a comment - - edited 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

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: