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

missing type in typecache? #12238

Closed
vtjnash opened this issue Jul 21, 2015 · 0 comments
Closed

missing type in typecache? #12238

vtjnash opened this issue Jul 21, 2015 · 0 comments

Comments

@vtjnash
Copy link
Sponsor Member

vtjnash commented Jul 21, 2015

there's a hack in object_id that allows recursive types to give a stable hash after the bind field gets corrupted at the end of creating a type. however, this might still be allowing the creation of invalid type objects:

julia> type A{T} end

julia> type B{T,S}
         a::A{B{Int,S}}
       end

julia> A.name.cache
svec()

julia> A.name.linearcache
svec() # expected A{B{Int}} here

julia> B.types[1] === A{B{Int}}
true # good

julia> A{B{Int}}.instance
A{B{Int64,S}}()

julia> A{B{Int}}.instance === B.types[1].instance
false #oops

fwiw, however, i don't seem to be able to find anything that this breaks

vtjnash added a commit that referenced this issue May 11, 2016
corrupt them before instead :)
when it's less likely someone is looking

fix #12238
fix #16301
vtjnash added a commit that referenced this issue May 12, 2016
corrupt them before instead :)
when it's less likely someone is looking

fix #12238
fix #16301
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

1 participant