Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow bitstype and symbol type parameters
Since Julia now allows these, we should, too. Before: ```julia julia> using HDF5, JLD type Foo{a}; end immutable Bar; x::Int; end julia> save("test.jld", "x", Foo{:x}()); load("test.jld") WARNING: type Foo{x} not present in workspace; reconstructing Dict{Union(UTF8String,ASCIIString),Any} with 1 entry: "x" => ##Foo{x}#9613() julia> save("test.jld", "x", Foo{1.0}()); load("test.jld") ERROR: `is_valid_type_ex` has no method matching is_valid_type_ex(::Float64) in map at ./base.jl:189 in is_valid_type_ex at /Users/mbauman/.julia/v0.3/HDF5/src/JLD.jl:753 in julia_type at /Users/mbauman/.julia/v0.3/HDF5/src/JLD.jl:772 in _julia_type at /Users/mbauman/.julia/v0.3/HDF5/src/JLD.jl:763 in julia_type at /Users/mbauman/.julia/v0.3/HDF5/src/JLD.jl:17 in jldatatype at /Users/mbauman/.julia/v0.3/HDF5/src/jld_types.jl:612 in read at /Users/mbauman/.julia/v0.3/HDF5/src/JLD.jl:331 in read at /Users/mbauman/.julia/v0.3/HDF5/src/JLD.jl:316 in anonymous at /Users/mbauman/.julia/v0.3/HDF5/src/JLD.jl:977 in jldopen at /Users/mbauman/.julia/v0.3/HDF5/src/JLD.jl:237 in load at /Users/mbauman/.julia/v0.3/HDF5/src/JLD.jl:976 julia> save("test.jld", "x", Foo{Bar(1)}); load("test.jld") WARNING: type Foo{Bar(1)} not present in workspace; reconstructing Dict{Union(UTF8String,ASCIIString),Any} with 1 entry: "x" => ##Foo{Bar(1)}#9675() ``` After: ```julia julia> save("test.jld", "x", Foo{:x}()); load("test.jld") Dict{Union(UTF8String,ASCIIString),Any} with 1 entry: "x" => Foo{:x}() julia> save("test.jld", "x", Foo{1.0}()); load("test.jld") Dict{Union(UTF8String,ASCIIString),Any} with 1 entry: "x" => Foo{1.0}() julia> save("test.jld", "x", Foo{Bar(1)}); load("test.jld") Dict{Union(UTF8String,ASCIIString),Any} with 1 entry: "x" => Foo{Bar(1)} ```
- Loading branch information