Skip to content

Commit

Permalink
Fix JuliaLang#16326: use typeof in code_* for all :call expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnorton committed Jun 24, 2016
1 parent beab3b6 commit 3495d9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base/interactiveutil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ typesof(args...) = Tuple{map(a->(isa(a,Type) ? Type{a} : typeof(a)), args)...}
gen_call_with_extracted_types(fcn, ex0::Symbol) = Expr(:call, fcn, Meta.quot(ex0))
function gen_call_with_extracted_types(fcn, ex0)
if isa(ex0, Expr) &&
any(a->(Meta.isexpr(a, :kw) || Meta.isexpr(a, :parameters)), ex0.args)
(any(a->(Meta.isexpr(a, :kw) || Meta.isexpr(a, :parameters)), ex0.args) ||
ex0.head == :call)
# keyword args not used in dispatch, so just remove them
args = filter(a->!(Meta.isexpr(a, :kw) || Meta.isexpr(a, :parameters)), ex0.args)
return Expr(:call, fcn, esc(args[1]),
Expand Down

0 comments on commit 3495d9f

Please sign in to comment.