Error in Broadcast in v0.7/v1.0

Someone from discourse.juliacn.com (the Chinese one) found this, I just translate for him. I think this is a bug? not what I expected.

julia> 1 .+ (1, 2)
(2, 3)

julia> 1 .+ 1 .+  (1, 2)
ERROR: MethodError: no method matching argtail()
Closest candidates are:
  argtail(::Any, ::Any...) at essentials.jl:172
Stacktrace:
 [1] tail(::Tuple{}) at ./essentials.jl:173
 [2] longest_tuple(::Nothing, ::Tuple{}) at ./broadcast.jl:928 (repeats 3 times)
 [3] longest_tuple(::Nothing, ::Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(+),Tuple{Int64,Int64}},Tuple{Int64,Int64}}) at ./broadcast.jl:927
 [4] copy at ./broadcast.jl:920 [inlined]
 [5] materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple},Nothing,typeof(+),Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(+),Tuple{Int64,Int64}},Tuple{Int64,Int64}}}) at ./broadcast.jl:724
 [6] top-level scope at none:0

Can you open an issue? Issues · JuliaLang/julia · GitHub

1 Like