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 call method in LinearAlgebra #75

Closed
arbenede opened this issue May 24, 2022 · 2 comments
Closed

Cannot call method in LinearAlgebra #75

arbenede opened this issue May 24, 2022 · 2 comments

Comments

@arbenede
Copy link

infil> using LinearAlgebra

infil> typeof(jacs_Jx[band])
Diagonal{Float64, Vector{Float64}}

infil> sum(diag(jacs_Jx[band]))
ERROR: UndefVarError: diag not defined
Stacktrace:
 [1] top-level scope
   @ none:1

Looking at other issues it seems that one should be able to call functions from other modules... Am I missing something? This is with Julia 1.7.2.

@arbenede arbenede changed the title Cannot call function LinearAlgebra Cannot call method in LinearAlgebra May 24, 2022
@pfitzseb
Copy link
Member

I can't repro this:

julia> using Infiltrator

julia> f() = @infiltrate
f (generic function with 1 method)

julia> f()
Infiltrating f()
  at REPL[6]:1

infil> using LinearAlgebra

infil> diag(rand(3,3))
3-element Vector{Float64}:
 0.36562883870167695
 0.921351746661747
 0.4063474189634826

julia> diag(rand(3,3))
ERROR: UndefVarError: diag not defined

Does this minimal example work for you? What version of Infiltrator are you on?

@arbenede
Copy link
Author

After updating to v1.4.0 then problem went away. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants