[SR-8725] AnyObject Constraints Do Not Participate in Overload Resolution #51236
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: fd60ebca177c5310df43da5a61db8ade
Issue Description:
AnyObject constraints do not participate in overload resolution, as such an overloaded generic function whose type parameters differ only by an AnyObject constraint, where neither function is a subtype of the other, will cause an "ambiguous use" error when attempting to use the more constrained function.
MWE:
The text was updated successfully, but these errors were encountered: