Hello!
I am wondering what or how is the best way to use @code_warntype
to inspect my code for type instabilities. To give you some context, I am working in a script file (.jl
) and doing using MyCustomModule
at the top to bring in some structs and methods I have written. Also, I am using VsCode with the Julia extension.
I want to step through the methods I have defined and try to find places where I might have created type instabilities. What I have tried thus far to do is have a line like this in my script (not all methods are exported) and run it interactively by highlighting it and pressing Shift+Enter. The output is sent to the REPL. .
@code_warntype MyCustomModule.SomeMethod
Regardless of which method I use the macro on though, I seem to only ever get back the following (below) and I assume I must be doing something wrong.
Variables
#self#::Core.Const(getproperty)
x::Module
f::Symbol
Body::Any
1 β %1 = Base.getfield(x, f)::Any
βββ return %1
I would appreciate any tips on how I could use this correctly.