mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user