Skip to content

Commit

Permalink
stop-gap for invalid existensials
Browse files Browse the repository at this point in the history
Cf. #8 "Upper bounds hard to track": not all existentials we see can be
instantiated because sometimes bounds are invalid.
  • Loading branch information
ulysses4ever committed Mar 1, 2022
1 parent 3ccb999 commit 4394355
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/StabilityCheck.jl
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,18 @@ subtype_unionall(u :: UnionAll, scfg :: SearchCfg) = begin
if isempty(sample_types)
[]
else
[u{t} for t in sample_types]
try
res = [u{t} for t in sample_types]
res
catch
[]
end
end
end

# Follows definition used in @code_warntype (cf. `warntype_type_printer` in:
# is_concrete_type: Type -> Bool
#
# Note: Follows definition used in @code_warntype (cf. `warntype_type_printer` in:
# julia/stdlib/InteractiveUtils/src/codeview.jl)
is_concrete_type(@nospecialize(ty)) = begin
if ty isa Type && (!Base.isdispatchelem(ty) || ty == Core.Box)
Expand Down

0 comments on commit 4394355

Please sign in to comment.