Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Nov 5, 2012
1 parent 25b4cfb commit 4597eb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion base/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,11 @@ end

function show(io, e::TypeError)
ctx = isempty(e.context) ? "" : "in $(e.context), "
if e.expected == Bool
if e.expected === Bool
print(io, "type error: non-boolean ($(typeof(e.got))) ",
"used in boolean context")
elseif e.expected === Function && e.func === :apply && isa(e.got,AbstractKind)
print(io, "type error: cannot instantiate abstract type $(e.got.name)")
else
if isa(e.got,Type)
tstr = "Type{$(e.got)}"
Expand Down

0 comments on commit 4597eb6

Please sign in to comment.