Does anyone know why the following code returns true on julia 0.6.4 but false on 0.7.0-rc2? It looks like the way that array constructors are parsed may have changed, but I can’t find it in the News.md. Does anyone know how to overload the array constructor on 0.7 the same way I could on 0.6.4?
import Base: hcat, vcat, ==
mutable struct Foo{T,N}
x::Array{T,N}
end
Foo(x) = Foo(vcat(x))
hcat(a::Foo, b::Foo) = Foo(hcat(a.x,b.x))
vcat(a::Foo, b::Foo) = Foo(vcat(a.x,b.x))
==(a::Foo, b::Foo) = a.x == b.x
[Foo(5) Foo(6); Foo(7) Foo(8)] == Foo([5 6; 7 8])
# true on 0.6.4
# false on 0.7.0-rc2
In particular, on 0.6.4:
julia> [Foo(5) Foo(6); Foo(7) Foo(8)]
Foo{Int64,2}([5 6; 7 8])
but on 0.7.0-rc2 I get:
julia> [Foo(5) Foo(6); Foo(7) Foo(8)]
2×2 Array{Foo{Int64,1},2}:
Foo{Int64,1}([5]) Foo{Int64,1}([6])
Foo{Int64,1}([7]) Foo{Int64,1}([8])