[SR-10610] Generic Method Participates Strangely In Overload Resolution #53010
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Additional Detail from JIRA
md5: 814d17451f959376bfe0bef5fb854f39
Issue Description:
It appears that even if the generic type ends up being more specific than a regular method (taking in the generic constraint as the actual type instead), the regular method is still the one that ends up being selected. In the below, I would expect the program to print "one", "two", "three".
Note: Changing the "two" method to be func f(_ p: P1 & P2) causes it to be selected instead of the "one" method.
The text was updated successfully, but these errors were encountered: