Begin updating type checking of array upcasts to conform with the new spec.

Also, call through DaveA's new entry point for upcasts on Array<T>.

Swift SVN r17564
This commit is contained in:
Joe Pamer
2014-05-06 21:32:22 +00:00
parent 05c80a8fe9
commit edb4946f66
7 changed files with 14 additions and 83 deletions

View File

@@ -1469,10 +1469,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, TypeMatchKind kind,
// Array supertype conversions.
if (kind >= TypeMatchKind::Conversion) {
if ((isArrayType(desugar1) && isArrayType(desugar2)) ||
(isSliceType(desugar1) && isSliceType(desugar2)) ||
(isNativeArrayType(desugar1) && isNativeArrayType(desugar2))) {
if (isArrayType(desugar1) && isArrayType(desugar2)) {
conversionsOrFixes.push_back(ConversionRestrictionKind::
ArrayUpcast);
}