Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Mar 18, 2023
1 parent 85e09e3 commit 8a6d110
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/analyzers/jetanalyzer.jl
Expand Up @@ -671,14 +671,26 @@ function report_method_error_for_union_split!(analyzer::JETAnalyzer,
empty_matches = uncovered_matches = nothing
for (i, matchinfo) in enumerate(info.matches)
if is_empty_match(matchinfo)
isnothing(split_argtypes) && (split_argtypes = switchtupleunion(argtypes))
if isnothing(split_argtypes)
@static if VERSION v"1.10.0-DEV.833"
split_argtypes = switchtupleunion(typeinf_lattice(analyzer), argtypes)
else
split_argtypes = switchtupleunion(argtypes)
end
end
if empty_matches === nothing
empty_matches = (Any[], length(info.matches))
end
sig_n = argtypes_to_type(split_argtypes[i]::Vector{Any})
push!(empty_matches[1], sig_n)
elseif sound && !is_fully_covered(matchinfo)
isnothing(split_argtypes) && (split_argtypes = switchtupleunion(argtypes))
if isnothing(split_argtypes)
@static if VERSION v"1.10.0-DEV.833"
split_argtypes = switchtupleunion(typeinf_lattice(analyzer), argtypes)
else
split_argtypes = switchtupleunion(argtypes)
end
end
if uncovered_matches === nothing
uncovered_matches = (Any[], length(info.matches))
end
Expand Down

0 comments on commit 8a6d110

Please sign in to comment.