On Sun, Jul 19, 2015 at 11:02 AM, Stefan Karpinski <stefan.karpin...@gmail.com> wrote: > Slicing with an empty array of element type Union() should be supportable, > though, no?
It's Any array on 0.4, which makes me hesitate whether we should support that. > >> On Jul 18, 2015, at 7:41 AM, Yichao Yu <yyc1...@gmail.com> wrote: >> >> On Sat, Jul 18, 2015 at 6:00 AM, Felipe Jiménez >> <felipe.jimene...@gmail.com> wrote: >>> Say A is an Array, like A = [1 2 3 4], and I index it with an empty vector. >>> >>> In Julia v.0.3, A[[]] is empty. I find this convenient when programming. >>> >>> In Julia v.0.4, A[[]] throws an error. >>> >>> Is this intended? It sometimes forces me to code if isempty()... else... >> >> The difference is that on 0.4, `[]` is a `Array{Any}`. Write `Int[]` >> should work. >> >>> >>> My version is 0.4.0-dev+5841 (2015-07-07 14:58 UTC), Commit f428392* (10 >>> days old master), x86_64-w64-mingw32. >>> >>> Thank you.