Skip to content

Commit c80f8a2

Browse files
committed
remove obscure TypeVar handling in arrayref_tfunc
1 parent c025fd8 commit c80f8a2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

base/compiler/tfuncs.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,12 +1472,8 @@ end
14721472
function arrayref_tfunc(@nospecialize(boundscheck), @nospecialize(a), @nospecialize i...)
14731473
a = widenconst(a)
14741474
if a <: Array
1475-
if isa(a, DataType) && begin
1476-
ap1 = a.parameters[1]
1477-
isa(ap1, Type) || isa(ap1, TypeVar)
1478-
end
1479-
# TODO: the TypeVar case should not be needed here
1480-
return unwraptv(ap1)
1475+
if isa(a, DataType) && (aparam1 = a.parameters[1]; isa(aparam1, Type))
1476+
return aparam1
14811477
elseif isa(a, UnionAll) && !has_free_typevars(a)
14821478
unw = unwrap_unionall(a)
14831479
if isa(unw, DataType)

0 commit comments

Comments
 (0)