Skip to content

Commit

Permalink
fix print_report(::IO, ::DivideErrro)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Apr 19, 2022
1 parent 06a0ab8 commit f6c9cd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/abstractinterpret/inferenceerrorreport.jl
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,10 @@ function (T::Type{<:InferenceErrorReport})(state, @nospecialize(spec_args...))
return T([vf], vf.sig, spec_args...)
end

get_spec_args(T::Type{<:InferenceErrorReport}) = error(lazy"`get_spec_args` is not implemented for $T")
print_report(io::IO, report::InferenceErrorReport) = error(lazy"`print_report` is not implemented for $(typeof(report))")
get_spec_args(report::InferenceErrorReport) = (@nospecialize;
error(lazy"`get_spec_args(::$(typeof(report)))` is not implemented"))
print_report(io::IO, report::InferenceErrorReport) = (@nospecialize;
error(lazy"`print_report(::IO, ::$(typeof(report)))` is not implemented"))

# default error report printer
function default_report_printer(io::IO, msg::AbstractString, sig::Signature)
Expand Down
2 changes: 1 addition & 1 deletion src/analyzers/jetanalyzer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ end

@reportdef struct DivideErrorReport <: BuiltinErrorReport end
let msg = sprint(showerror, DivideError())
function print_report(io::IO, ::DivideErrorReport)
global function print_report(io::IO, ::DivideErrorReport)
print_error(io, msg)
end
end
Expand Down

0 comments on commit f6c9cd7

Please sign in to comment.