I am trying to create an Array with named tuples inside where one of the fields is an array. In 0.6 this is possible
a = @NT(t = 10, x = [1,2])
b = @NT(t = 1, x = [23,3])
m = [a,b]
However, in Julia 0.7 I get this error
m = (a=10, b=[1,2])
m2 = (a=10, b2=1)
[m,m2]
type UnionAll has no field name
Stacktrace:
[1] getproperty at ./sysimg.jl:15 [inlined]
[2] typeinfo_prefix(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Array{Int64,1}) at ./arrayshow.jl:477
[3] show_vector(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Array{Int64,1}, ::Char, ::Char) at ./arrayshow.jl:431 (repeats 2 times)
[4] show at ./arrayshow.jl:417 [inlined]
[5] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::NamedTuple{(:a, :b),Tuple{Int64,Array{Int64,1}}}) at ./namedtuple.jl:142
[6] #sprint#330(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Int64, ::Function, ::Function, ::NamedTuple{(:a, :b),Tuple{Int64,Array{Int64,1}}}) at ./strings/io.jl:97
[7] #sprint at ./none:0 [inlined]
[8] alignment(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::NamedTuple{(:a, :b),Tuple{Int64,Array{Int64,1}}}) at ./show.jl:1719
[9] alignment(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Array{NamedTuple,1}, ::Base.OneTo{Int64}, ::Base.OneTo{Int64}, ::Int64, ::Int64, ::Int64) at ./arrayshow.jl:68
[10] print_matrix(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Array{NamedTuple,1}, ::String, ::String, ::String, ::String, ::String, ::String, ::Int64, ::Int64) at ./arrayshow.jl:186
[11] print_matrix at ./arrayshow.jl:159 [inlined]
[12] print_array at ./arrayshow.jl:308 [inlined]
[13] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol("text/plain")}, ::Array{NamedTuple,1}) at ./arrayshow.jl:344
[14] limitstringmime(::MIME{Symbol("text/plain")}, ::Array{NamedTuple,1}) at /Users/jdlara/.julia/packages/IJulia/Nnq2/src/inline.jl:24
[15] display_dict(::Array{NamedTuple,1}) at /Users/jdlara/.julia/packages/IJulia/Nnq2/src/execute_request.jl:28
[16] #invokelatest#1 at ./essentials.jl:670 [inlined]
[17] invokelatest at ./essentials.jl:669 [inlined]
[18] execute_request(::ZMQ.Socket, ::IJulia.Msg) at /Users/jdlara/.julia/packages/IJulia/Nnq2/src/execute_request.jl:208
[19] #invokelatest#1 at ./essentials.jl:670 [inlined]
[20] invokelatest at ./essentials.jl:669 [inlined]
[21] eventloop(::ZMQ.Socket) at /Users/jdlara/.julia/packages/IJulia/Nnq2/src/eventloop.jl:8
[22] (::getfield(IJulia, Symbol("##15#18")))() at ./task.jl:257
is there any way around it or is it a feature?