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

Breaking on type constructors with parameters #525

Open
KristofferC opened this issue Mar 7, 2022 · 0 comments
Open

Breaking on type constructors with parameters #525

KristofferC opened this issue Mar 7, 2022 · 0 comments

Comments

@KristofferC
Copy link
Member

After #524 it is possible to set breakpoint on type constructors but this fail when a type constructor is called with specific parameters:

julia> struct Constructor{T}
           x::T
       end

julia> breakpoint(Constructor)
Constructor

julia> @interpret Constructor{Int}(2) # no breakpoint
Constructor{Int64}(2)

julia> @interpret Constructor(2) # works
(Frame for Constructor(x::T) where T in Main at REPL[2]:2
b 1 2  1%1 = Core.apply_type($(QuoteNode(Constructor)), $(Expr(:static_parameter, 1)))
  2 2%2 = (%1)(x)
  3 2  └──      return %2
x = 2
T = Int64
var = T
body = Constructor{T}, breakpoint(Constructor(x::T) where T in Main at REPL[2]:2, line 2))

Presumably, one wants to also break on Constructor{Int} when one adds a breakpoint to Constructor.

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