Skip to content

Commit

Permalink
apply suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Feb 15, 2021
1 parent b72fd8f commit 9ba3d81
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions base/essentials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,14 @@ end

function rewrap_unionall(t::Core.TypeofVararg, @nospecialize(u))
isdefined(t, :T) || return t
if !isdefined(t, :N) || (isa(u, UnionAll) && t.N === u.var)
return Vararg{rewrap_unionall(t.T, u)}
if !isa(u, UnionAll)
return t
end
T = rewrap_unionall(t.T, u)
if !isdefined(t, :N) || t.N === u.var
return Vararg{T}
end
Vararg{rewrap_unionall(t.T, u), t.N}
return Vararg{T, t.N}
end

# replace TypeVars in all enclosing UnionAlls with fresh TypeVars
Expand Down

0 comments on commit 9ba3d81

Please sign in to comment.