We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TypeVar
arrayref_tfunc
1 parent c025fd8 commit c80f8a2Copy full SHA for c80f8a2
base/compiler/tfuncs.jl
@@ -1472,12 +1472,8 @@ end
1472
function arrayref_tfunc(@nospecialize(boundscheck), @nospecialize(a), @nospecialize i...)
1473
a = widenconst(a)
1474
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)
+ if isa(a, DataType) && (aparam1 = a.parameters[1]; isa(aparam1, Type))
+ return aparam1
1481
elseif isa(a, UnionAll) && !has_free_typevars(a)
1482
unw = unwrap_unionall(a)
1483
if isa(unw, DataType)
0 commit comments