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

fix :typeinfo with tuple elements (closes #25042) #25043

Merged
merged 1 commit into from
Dec 15, 2017

Conversation

rfourquet
Copy link
Member

@rfourquet rfourquet commented Dec 12, 2017

This example proves that it was nice to keep as @assert in the the :typeinfo code (in the typeinfo_prefix function), rather than ignoring unexpected inconsistencies, as this would have led to have:

julia> fill((1, zeros(Float16, 3)), 3)
3-element Array{Tuple{Int64,Array{Float16,1}},1}:
 (1, Float16[0.0, 0.0, 0.0])
 (1, Float16[0.0, 0.0, 0.0])
 (1, Float16[0.0, 0.0, 0.0])

whereas with this fix we get

julia> fill((1, zeros(Float16, 3)), 3)
3-element Array{Tuple{Int64,Array{Float16,1}},1}:
 (1, [0.0, 0.0, 0.0])
 (1, [0.0, 0.0, 0.0])
 (1, [0.0, 0.0, 0.0])

@rfourquet rfourquet added bugfix This change fixes an existing bug display and printing Aesthetics and correctness of printed representations of objects. labels Dec 12, 2017
@strickek
Copy link
Contributor

strickek commented Dec 12, 2017

Why is this a 10- and not a 3-element Array?

@rfourquet rfourquet force-pushed the rf/typeinfo-fix-tuple branch from e8c87f5 to 6eeb017 Compare December 12, 2017 18:36
@rfourquet
Copy link
Member Author

Why is this a 10- and not a 3-element Array?

Because in the issue it was using 10, not 3, but 3 was enough to make the point, but forgot to update the 10 from the summary while copy-pasting from my REPL. Thanks, I updated the OP.

@rfourquet rfourquet merged commit 9315ca0 into master Dec 15, 2017
@rfourquet rfourquet deleted the rf/typeinfo-fix-tuple branch December 15, 2017 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug display and printing Aesthetics and correctness of printed representations of objects.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants