Not sure if I’m doing something wrong or if this is a bug with the vs code extension…
In here Performance Tips · The Julia Language
it says
The most important characteristic of
@code_warntype
is that non-concrete types are displayed in red
So I put this code in its own file
using InteractiveUtils
struct MyType
x::Int64
end
@code_warntype MyType(1)
I get this:
MethodInstance for MyType(::Int64)
from MyType(x::Int64) in Main at /home/me/test.jl:4
Arguments
#self#::Core.Const(MyType)
x::Int64
Body::MyType
1 ─ %1 = %new(Main.MyType, x)::MyType
└── return %1
However, when running frome either the comannd line, or the native REPL, all types are blue. When running from the VS code repl, all types are red. In fact, it looks like in vs code all types are always red in @code_warntype
no matter what I apply that macro to.