Closed
Description
DataFrames formula code hits an inference regression with an empty array. This is problematic since !
is now only defined for AbstractArray{Bool}
(which might be an issue on its own).
function f()
x = [1]
x = x[!(x .== 1)]
x .== 0
end
function g()
x = Any[1]
x = x[!(x .== 1)]
x .== 0
end
function h()
x = Any[1]
x .== 0
end
On Julia 0.5.0:
julia> f()
0-element BitArray{1}
julia> g()
0-element BitArray{1}
julia> h()
1-element BitArray{1}:
false
On master:
julia> f()
0-element BitArray{1}
julia> g()
0-element Array{Any,1}
julia> h()
1-element BitArray{1}:
false