Skip to content

Commit

Permalink
remove obscure TypeVar handling in arrayref_tfunc
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Oct 13, 2021
1 parent 31d826e commit d14503a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions base/compiler/tfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1472,12 +1472,8 @@ end
function arrayref_tfunc(@nospecialize(boundscheck), @nospecialize(a), @nospecialize i...)
a = widenconst(a)
if a <: Array
if isa(a, DataType) && begin
ap1 = a.parameters[1]
isa(ap1, Type) || isa(ap1, TypeVar)
end
# TODO: the TypeVar case should not be needed here
return unwraptv(ap1)
if isa(a, DataType) && (aparam1 = a.parameters[1]; isa(aparam1, Type))
return aparam1
elseif isa(a, UnionAll) && !has_free_typevars(a)
unw = unwrap_unionall(a)
if isa(unw, DataType)
Expand Down

0 comments on commit d14503a

Please sign in to comment.