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

print_with_compare re-implementation of show_datatype is bad #36644

Closed
vtjnash opened this issue Jul 13, 2020 · 0 comments
Closed

print_with_compare re-implementation of show_datatype is bad #36644

vtjnash opened this issue Jul 13, 2020 · 0 comments
Labels
display and printing Aesthetics and correctness of printed representations of objects. regression Regression in behavior compared to a previous version

Comments

@vtjnash
Copy link
Sponsor Member

vtjnash commented Jul 13, 2020

julia> Base.print_with_compare(stdout, Int, Int, :a)
Int64{}

julia> Int64{}
ERROR: TypeError: in Type{...} expression, expected UnionAll, got Type{Int64}

observed while trying to decipher this printing (from #36573):

julia> Base.showerror(stdout, MethodError(convert, (Type{Tuple{Tuple{Int64,Int64},Int64}}, Tuple{Int64,Int64,Int64})))
MethodError: Cannot `convert` an object of type 
  Type{Tuple{Int64,Int64{},Int64}} to an object of type 
  Type{Tuple{Tuple{Int64,Int64},Int64{}}}

This code perhaps shouldn't be dispatching on type in this way, since it should probably be calling the normal show logic here.

@vtjnash vtjnash added regression Regression in behavior compared to a previous version display and printing Aesthetics and correctness of printed representations of objects. labels Jul 13, 2020
@vtjnash vtjnash closed this as completed May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display and printing Aesthetics and correctness of printed representations of objects. regression Regression in behavior compared to a previous version
Projects
None yet
Development

No branches or pull requests

1 participant