julia-vscode
julia-vscode copied to clipboard
Bogus unused variable in function argument
This code shows var being unused and color-highlighted in gray.
function f(var)
rand() > 0.5 && (var = 1)
return var
end
It is however used.
Well, it is used in 50% of function calls... :) But yes, we don't currently handle this kind of conditional assignment well at all.
I don't know if this is the right "unused variable" issue to add examples to, but Base.@kwdef's code shows params_ex and call_args as unused while they are
