-
-
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
reduce
type inference on 1.6
#40277
Labels
Comments
Interestingly, julia> @inferred reduce(vcat, ([10.0], Bool[], [30.0]))
2-element Vector{Float64}:
10.0
30.0
julia> @inferred reduce(vcat, ([10.0], [20.0], Bool[]))
ERROR: return type Vector{Float64} does not match inferred return type AbstractVector{T} where T
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] top-level scope
@ REPL[114]:1 |
I'll try bisect it. |
KristofferC
added
compiler:inference
Type inference
regression
Regression in behavior compared to a previous version
labels
Mar 31, 2021
Bisection blames b4f2c66, cc @dlfivefifty |
Found a fix, will make a PR: julia> x_vecs = ([5, ], [1.0, 2.0, 3.0]);
julia> @inferred reduce(vcat, x_vecs);
ERROR: return type Vector{Float64} does not match inferred return type AbstractVector{T} where T
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] top-level scope
@ REPL[2]:1
julia> Base._typed_vcat(::Type{T}, V::Base.AbstractVecOrTuple{AbstractVector}) where T = Base._typed_vcat!(Base._typed_vcat_similar(V, T, sum(map(length,V))), V)
julia> @inferred reduce(vcat, x_vecs);
julia> |
dlfivefifty
added a commit
to dlfivefifty/julia
that referenced
this issue
Apr 1, 2021
vtjnash
pushed a commit
that referenced
this issue
Apr 3, 2021
KristofferC
pushed a commit
that referenced
this issue
Apr 4, 2021
KristofferC
pushed a commit
that referenced
this issue
Apr 4, 2021
KristofferC
pushed a commit
that referenced
this issue
Apr 4, 2021
ElOceanografo
pushed a commit
to ElOceanografo/julia
that referenced
this issue
May 4, 2021
antoine-levitt
pushed a commit
to antoine-levitt/julia
that referenced
this issue
May 9, 2021
johanmon
pushed a commit
to johanmon/julia
that referenced
this issue
Jul 5, 2021
staticfloat
pushed a commit
that referenced
this issue
Dec 23, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
On julia 1.5
On julia 1.6
The text was updated successfully, but these errors were encountered: