-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release-0.6] help #24383 inference and load time regression #24399
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -959,3 +959,18 @@ for i in 1:3 | |
ir = sprint(io->code_llvm(io, f22290, Tuple{})) | ||
@test contains(ir, "julia_f22290") | ||
end | ||
|
||
# approximate static parameters due to unions | ||
let T1 = Array{Float64}, T2 = Array{_1,2} where _1 | ||
inference_test_copy(a::T) where {T<:Array} = ccall(:jl_array_copy, Ref{T}, (Any,), a) | ||
rt = Base.return_types(inference_test_copy, (Union{T1,T2},))[1] | ||
@test rt >: T1 && rt >: T2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be testing for equality to something. I know you only want to test for strongly valid properties, but as written, I can't verify that this test is testing for the reported issue. And it could also break again later without noticing that this test was later rendered ineffectual. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The brokenness before was that |
||
|
||
el(x::T) where {T} = eltype(T) | ||
rt = Base.return_types(el, (Union{T1,Array{Float32,2}},))[1] | ||
@test rt >: Union{Type{Float64}, Type{Float32}} | ||
|
||
g(x::Ref{T}) where {T} = T | ||
rt = Base.return_types(g, (Union{Ref{Array{Float64}}, Ref{Array{Float32}}},))[1] | ||
@test rt >: Union{Type{Array{Float64}}, Type{Array{Float32}}} | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this commit should probably be put on master first