Arbitrary call priority when two methods differ only by presence of type parameter #19413
Closed
Description
In the following, the second test
method does not overwrite the previous one despite actually accepting exactly the same argument types. Even more annoyingly, no method consistently takes precedence on the other: the method which is called is the first one which was used in the session. So the code below returns 1
as-is, and 2
when removing test(0)
and running it in a new session.
test(x) = 1
test(0)
test{T}(x::T) = 2
test(0)
(Sorry if it's been reported elsewhere, I know similar issues are around but I couldn't find them.)
Activity