Commits

Doug Gregor committed f7cde83ae39
Improve overload resolution with a simplistic scoring system. When comparing two solutions, compute their relative score by comparing selected overloads (1 point for having an overload at least as good as the other solution's), type bindings (1 point for having a subtype of the other solution's), and literal type bindings (1 point for matching the corresponding default literal type). This puts overload and type-binding scoring on an equal footing, and eliminates the any incomparable overloads/type bindings from consideration. Eventually, it should help the solver avoid paths to solutions that won't be profitable. The library changes are partly about the removal of unnecessary code (workarounds for already-fixed problems in the type checker), and partly to avoid requiring partial ordering of generic functions (<rdar://problem/14005145>), which is not yet implemented. The test churn is almost completely positive: a number of FIXMEs related to missing diagnostics have been replaced with expected errors (albeit ugly ones). The exception is test/subscripting.swift, which has an unexpected failure due to the lack of overload comparison for subscript declarations. Implements part of <rdar://problem/11510876> (overload resolution). Swift SVN r5575