Warnings about unused parameter in method

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.

2 Likes