-
-
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
Inference regression for empty array #20037
Comments
(Tangentially, perhaps we should deprecate |
In the meantime, if you need a workaround, you can do iseq(x, y)::Bool = x == y
function g()
x = Any[1]
x = x[(!).(iseq.(x, 1))]
iseq.(x, 0)
end |
The original code is deprecated for broadcasted |
How so? I still see
return a also with
|
Yeah, I goofed here. |
we can simplify the original question to simply: julia> [] .== 0
0-element Array{Any,1} Which further simplifies to: Core.Inference.return_type(==, (Any, Int)) === Bool However, we haven't typically been willing to commit to forcing |
Why do we return |
Are we OK with the current behavior of |
In #17811 I was convinced to always use the inferred type instead of |
Let's close this then. |
DataFrames formula code hits an inference regression with an empty array. This is problematic since
!
is now only defined forAbstractArray{Bool}
(which might be an issue on its own).On Julia 0.5.0:
On master:
The text was updated successfully, but these errors were encountered: