Commits
Doug Gregor committed b86828fbab9
Implement basic overload resolution.
When different solutions to the same constraint system have selected
different overload choices for the same locator, compare the overload
choices. The rules are fairly simplistic:
- An identity overload beats a declaration overload.
- A declaration overload beats another declaration overload if it is
more specialized, meaning that:
+ It is monomorphic while the other is polymorphic
+ It's type is a subtype of the other's type (but the converse
is not true)
Expect more revision here. In particular, we likely will only need the
subtyping rule when comparing two declarations, but our "is a subtype"
check currently doesn't handle polymorphic function types well, so we
avoid them.
Swift SVN r5521