Skip to content

Commit

Permalink
return tuple type manipulations to deprecated.jl (JuliaLang#36769)
Browse files Browse the repository at this point in the history
Some important packages seem to use these.
  • Loading branch information
vtjnash authored and simeonschaub committed Aug 11, 2020
1 parent e53c5aa commit 629e064
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,13 @@ iterate(match::Core.MethodMatch, field::Int=1) =
getindex(match::Core.MethodMatch, field::Int) =
getfield(match, field)


# these were internal functions, but some packages seem to be relying on them
tuple_type_head(T::Type) = fieldtype(T, 1)
tuple_type_cons(::Type, ::Type{Union{}}) = Union{}
function tuple_type_cons(::Type{S}, ::Type{T}) where T<:Tuple where S
@_pure_meta
Tuple{S, T.parameters...}
end

# END 1.6 deprecations

0 comments on commit 629e064

Please sign in to comment.