Commit Graph

1 Commits

Author SHA1 Message Date
Doug Gregor
fa474ee750 Implement simplification of conversion constraints for user-defined
conversions. We limit the relationship between the result of the
conversion and the actual expected type to a subtyping relationship,
which effectively limits us to applying a single user-defined
conversion function (rather than a chain of such conversions).

Later, we can consider extending this to a chain of conversion
functions, but that will require us to cope with cyclic conversions
and minimizing conversion sequences (e.g., if A -> B -> C and A -> C
are both possible, we should prefer A -> C).


Swift SVN r2730
2012-08-23 23:25:02 +00:00