Consider the code:

filter(n -> true, collect(1:0))

this returns a 0-element array.  However if I don't collect the iterator 
into an array:

filter(n -> true, 1:0)

I get the error 

Error: TypeError: typeassert: expected AbstractArray{Bool, N}, got 
Array{Int64, 1} in filter at array.jl:923

It seems like this should also return a 0-element array, since if the 
iterator is non empty, e.g.

filter(n -> true, 1:2)

I get a two the element array [1,2].

Reply via email to