Skip to content

Commit

Permalink
for variadic invokes we need to munge info, not the name so that we get
Browse files Browse the repository at this point in the history
shadowing information
  • Loading branch information
swannodette committed Oct 6, 2013
1 parent c979df1 commit aa8d69e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/clj/cljs/compiler.clj
Original file line number Diff line number Diff line change
Expand Up @@ -679,15 +679,15 @@
;; direct dispatch to variadic case
(and variadic? (> arity mfa))
[(update-in f [:info :name]
(fn [name] (symbol (str (munge name) ".cljs$core$IFn$_invoke$arity$variadic"))))
(fn [name] (symbol (str (munge info) ".cljs$core$IFn$_invoke$arity$variadic"))))
{:max-fixed-arity mfa}]

;; direct dispatch to specific arity case
:else
(let [arities (map count mps)]
(if (some #{arity} arities)
[(update-in f [:info :name]
(fn [name] (symbol (str (munge name) ".cljs$core$IFn$_invoke$arity$" arity)))) nil]
(fn [name] (symbol (str (munge info) ".cljs$core$IFn$_invoke$arity$" arity)))) nil]
[f nil]))))
[f nil])]
(emit-wrap env
Expand Down

0 comments on commit aa8d69e

Please sign in to comment.