Skip to content

Commit

Permalink
Fix gen_call_with_extracted unmatched case
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnorton committed Oct 7, 2015
1 parent 19563a3 commit 68bc1ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion base/interactiveutil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ function gen_call_with_extracted_types(fcn, ex0)
return Expr(:call, fcn, esc(args[1]),
Expr(:call, typesof, map(esc, args[2:end])...))
end
exret = Expr(:none)
ex = expand(ex0)
if !isa(ex, Expr)
exret = Expr(:call, :error, "expression is not a function call or symbol")
Expand All @@ -266,7 +267,8 @@ function gen_call_with_extracted_types(fcn, ex0)
Expr(:call, typesof, map(esc, a1.args[2:end])...))
end
end
elseif ex.head == :thunk
end
if ex.head == :thunk || exret.head == :none
exret = Expr(:call, :error, "expression is not a function call, "
* "or is too complex for @$fcn to analyze; "
* "break it down to simpler parts if possible")
Expand Down

0 comments on commit 68bc1ca

Please sign in to comment.