-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Description
foo(b::Bar...) = 1
# foo (generic function with 1 methods)
foo(a::Any, b::Bar) = 2
# foo (generic function with 2 methods)
foo(b::Bar, a::Any) = 3
# Warning: New definition
# foo(Bar,Any)
# is ambiguous with:
# foo(Any,Bar)
# To fix, define
# foo(Bar,Bar)
# before the new definition.
# foo (generic function with 3 methods)Semantically, foo(Bar,Bar)` is covered by the first definition, and the above example behaves as expected.
Is the warning really warranted?
Metadata
Metadata
Assignees
Labels
No labels