Skip to content

Commit

Permalink
Merge branch 'master' into avi/remove-pure-take2
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk authored Feb 16, 2023
2 parents f364260 + e45bb08 commit b42e04d
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
7 changes: 1 addition & 6 deletions base/essentials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,8 @@ function rename_unionall(@nospecialize(u))
if !isa(u, UnionAll)
return u
end
body = rename_unionall(u.body)
if body === u.body
body = u
else
body = UnionAll(u.var, body)
end
var = u.var::TypeVar
body = UnionAll(var, rename_unionall(u.body))
nv = TypeVar(var.name, var.lb, var.ub)
return UnionAll(nv, body{nv})
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
94e0a5b63c14d98b2f4d05fd5c6ff1e5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fd4b47f78acb5981da78609bfba37fbe0ae066f6b0bc65dd090f42677e5e90d19e2deb16b624d9722820fc78b7ffb0d019089bb9032daf08aa083cf1f69e5dd7

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion stdlib/Pkg.version
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PKG_BRANCH = master
PKG_SHA1 = ed505db0bb329df25fa0eaba9de53ecb5fa89c93
PKG_SHA1 = 5ad4b9e928620cd807f22ae0865ae452cd1bea81
PKG_GIT_URL := https://github.com/JuliaLang/Pkg.jl.git
PKG_TAR_URL = https://api.github.com/repos/JuliaLang/Pkg.jl/tarball/$1
11 changes: 10 additions & 1 deletion test/compiler/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2700,7 +2700,16 @@ let 𝕃 = Core.Compiler.fallback_lattice
@test apply_type_tfunc(𝕃, Const(Issue47089), A, A) <: (Type{Issue47089{A,B}} where {A<:Integer, B<:Integer})
end
@test only(Base.return_types(keys, (Dict{String},))) == Base.KeySet{String, T} where T<:(Dict{String})
@test only(Base.return_types((r)->similar(Array{typeof(r[])}, 1), (Base.RefValue{Array{Int}},))) == Vector{T} where T<:(Array{Int})
@test only(Base.return_types((r)->similar(Array{typeof(r[])}, 1), (Base.RefValue{Array{Int}},))) == Vector{<:Array{Int}}
@test only(Base.return_types((r)->similar(Array{typeof(r[])}, 1), (Base.RefValue{Array{<:Real}},))) == Vector{<:Array{<:Real}}

let A = Tuple{A,B,C,D,E,F,G,H} where {A,B,C,D,E,F,G,H}
B = Core.Compiler.rename_unionall(A)
for i in 1:8
@test A.var != B.var && (i == 1 ? A == B : A != B)
A, B = A.body, B.body
end
end

# PR 27351, make sure optimized type intersection for method invalidation handles typevars

Expand Down

0 comments on commit b42e04d

Please sign in to comment.