Skip to content

Commit

Permalink
fix effects handling for OCCallInfo/ReturnTypeCallInfo (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk authored Mar 27, 2022
1 parent bbb41b9 commit de98e6a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/callsite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,15 @@ struct OCCallInfo <: CallInfo
end
get_mi(occi::OCCallInfo) = get_mi(occi.ci)
get_rt(occi::OCCallInfo) = get_rt(occi.ci)
get_effects(::OCCallInfo) = Effects()

# Special handling for ReturnTypeCall
struct ReturnTypeCallInfo <: CallInfo
vmi::CallInfo # virtualized method call
end
get_mi((; vmi)::ReturnTypeCallInfo) = isa(vmi, FailedCallInfo) ? nothing : get_mi(vmi)
get_rt((; vmi)::ReturnTypeCallInfo) = Type{isa(vmi, FailedCallInfo) ? Union{} : widenconst(get_rt(vmi))}
get_effects(::ReturnTypeCallInfo) = Effects()

struct ConstPropCallInfo <: CallInfo
mi::CallInfo
Expand Down

0 comments on commit de98e6a

Please sign in to comment.