File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -826,17 +826,18 @@ function getfield_tfunc(@nospecialize(s00), @nospecialize(name))
826
826
end
827
827
end
828
828
s = typeof (sv)
829
- elseif isa (s, PartialStruct)
829
+ elseif isa (s00, PartialStruct)
830
+ s = widenconst (s00)
831
+ sty = unwrap_unionall (s):: DataType
830
832
if isa (name, Const)
831
833
nv = name. val
832
834
if isa (nv, Symbol)
833
- nv = fieldindex (widenconst (s) , nv, false )
835
+ nv = fieldindex (sty , nv, false )
834
836
end
835
- if isa (nv, Int) && 1 <= nv <= length (s . fields)
836
- return unwrapva (s . fields[nv])
837
+ if isa (nv, Int) && 1 <= nv <= length (s00 . fields)
838
+ return unwrapva (s00 . fields[nv])
837
839
end
838
840
end
839
- s = widenconst (s)
840
841
end
841
842
if isType (s) || ! isa (s, DataType) || isabstracttype (s)
842
843
return Any
You can’t perform that action at this time.
0 commit comments