I’d probably write that as:
function pattern(::A, pos::Float64)
pos^2
end
which hopefully makes it clear to the reader (and to whatever tool is generating the warning) that the first argument’s value is unused but its type is relevant.
I’d probably write that as:
function pattern(::A, pos::Float64)
pos^2
end
which hopefully makes it clear to the reader (and to whatever tool is generating the warning) that the first argument’s value is unused but its type is relevant.