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

error with julia new type system #255

Closed
CarloLucibello opened this issue Jan 16, 2017 · 7 comments
Closed

error with julia new type system #255

CarloLucibello opened this issue Jan 16, 2017 · 7 comments

Comments

@CarloLucibello
Copy link
Contributor

on julia 0.6, after JuliaLang/julia#18457, I get the following error

ERROR: LoadError: LoadError: ArgumentError: method definition for Type at /home/carlo/.julia/v0.6/DataStructures/src/hash_dict.jl:72 has free type variables
Stacktrace:
 [1] include_from_node1(::String) at ./loading.jl:532
 [2] include(::String) at ./sysimg.jl:14
 [3] include_from_node1(::String) at ./loading.jl:532
 [4] include(::String) at ./sysimg.jl:14
 [5] anonymous at ./<missing>:2
while loading /home/carlo/.julia/v0.6/DataStructures/src/hash_dict.jl, in expression starting on line 72
while loading /home/carlo/.julia/v0.6/DataStructures/src/DataStructures.jl, in expression starting on line 70

And here is the culprit

HashDict{V}(kv::Tuple{Vararg{Pair{TypeVar(:K),V}}}) = HashDict{Any,V}(kv)
@kmsquire
Copy link
Member

Thanks for the report. HashDict is about to be removed in #252, so this should hopefully be resolved then.

@CarloLucibello
Copy link
Contributor Author

CarloLucibello commented Jan 16, 2017

same problem on that branch for OrderedDict:

ERROR: LoadError: LoadError: ArgumentError: method definition for Type at /home/carlo/.julia/v0.6/DataStructures/src/ordered_dict.jl:62 has free type variables
Stacktrace:
 [1] include_from_node1(::String) at ./loading.jl:532
 [2] include(::String) at ./sysimg.jl:14
 [3] include_from_node1(::String) at ./loading.jl:532
 [4] include(::String) at ./sysimg.jl:14
 [5] anonymous at ./<missing>:2
while loading /home/carlo/.julia/v0.6/DataStructures/src/ordered_dict.jl, in expression starting on line 62

@JeffBezanson
Copy link
Contributor

See the Dict constructors in Base for how to rewrite these. e.g.

Dict{V  }(ps::(Pair{K,V} where K)...,) = Dict{Any,V}(ps)

@kmsquire
Copy link
Member

Ok. I assume test syntax doesn't parse on earlier versions of Julia, so these changes will have to be v0.6 only?

@kmsquire
Copy link
Member

Fixed by #257. (Needs to be tagged.)

@mauro3
Copy link

mauro3 commented Jan 18, 2017

Yep, a tag would be great.

@kmsquire
Copy link
Member

Tagged

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

No branches or pull requests

4 participants