JLD2.jl
JLD2.jl copied to clipboard
Saving tuple-like types of unknown size
Hi,
should it be possible to save tuple-like types of unknown size?
Currently, this is not working:
using JLD2
T = NTuple{N, Int} where N
jldsave("test.jld2", myT = T)
but giving the following stacktrace.txt
Interestingly, this way it works:
struct test_workaround
a::(NTuple{N,Int} where N)
end
jldsave("test.jld2", a=test_workaround)
while this is again giving the same error:
struct test{X<:(NTuple{N,Int} where N)}
a::X
end
jldsave("test.jld2", a=test)
(This issue is closely related to https://github.com/oschulz/ValueShapes.jl/issues/62)
You are right, that should probably be possible.