Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Round-trip serialization for Tuple{Type{Int32}} results in Tuple{DataType} #484

Closed
topolarity opened this issue Sep 21, 2023 · 1 comment · Fixed by #485
Closed

Round-trip serialization for Tuple{Type{Int32}} results in Tuple{DataType} #484

topolarity opened this issue Sep 21, 2023 · 1 comment · Fixed by #485

Comments

@topolarity
Copy link

Type{T} seems to be normalized incorrectly to DataType by JLD2 when it is wrapped by other types.

MWE:

julia> jldsave("example.jld2"; T=Tuple{Type{Int32}})

julia> jldopen("example.jld2", "r") do file file["T"] end
Tuple{DataType}

P.S. Thanks for your hard work on JLD2 - I've really enjoyed my time with the package so far

@JonasIsensee
Copy link
Collaborator

Thanks for reporting this.
This is a tricky edge case of the bootstrapping for the julia type system.
I think I fixed it in #485

julia> Type{Int} isa DataType
true

julia> Type{Int} <: DataType
true

julia> DataType <: Type
true

julia> DataType isa Type
true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants