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

cannot display body field of UnionAll type in IJulia #1098

Open
matthias314 opened this issue Nov 27, 2023 · 0 comments
Open

cannot display body field of UnionAll type in IJulia #1098

matthias314 opened this issue Nov 27, 2023 · 0 comments

Comments

@matthias314
Copy link

Julia (1.9.4, 1.10.0-rc1, master):

julia> Pair{Char}.body
Pair{Char, B}

julia> Pair.body
Pair{A}

IJulia (v1.24.2):

In [1]: Pair{Char}.body
Out[1]: Pair{Char, B}

In [2]: Pair.body
MethodError: Cannot `convert` an object of type Type{Pair{A}} to an object of type DataType

Closest candidates are:
  convert(::Type{T}, ::T) where T
   @ Base Base.jl:96


Stacktrace:
 [1] Base.Fix2(f::typeof(isequal), x::Type)
   @ Base ./operators.jl:1139
 [2] isequal
   @ Base ./operators.jl:1154 [inlined]
 [3] undisplay(x::Type)
   @ IJulia /usr/local/julia/packages/IJulia/Vo51o/src/display.jl:131
 [4] execute_request(socket::ZMQ.Socket, msg::IJulia.Msg)
   @ IJulia /usr/local/julia/packages/IJulia/Vo51o/src/execute_request.jl:107
 [5] #invokelatest#2
   @ ./essentials.jl:955 [inlined]
 [6] invokelatest
   @ ./essentials.jl:952 [inlined]
 [7] eventloop(socket::ZMQ.Socket)
   @ IJulia /usr/local/julia/packages/IJulia/Vo51o/src/eventloop.jl:8
 [8] (::IJulia.var"#15#18")()
   @ IJulia /usr/local/julia/packages/IJulia/Vo51o/src/eventloop.jl:38

I don't know if displaying such internal fields is considered fair game or not.

@matthias314 matthias314 changed the title cannot dispay body field of UnionAll type in IJulia cannot display body field of UnionAll type in IJulia Nov 27, 2023
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