julia> struct S{T} end
julia> T(::S{T}) where {T <: Any} = one(T)
T (generic function with 0 methods)
It seems Julia is confused by the function name being the same as a type parameter. I guess Julia should throw an error here instead of defining a function without the method?