@@ -6018,7 +6018,7 @@ bool ConstraintSystem::repairFailures(
60186018 // ```
60196019 if (rhs->isKnownStdlibCollectionType()) {
60206020 std::function<Type(Type)> getArrayOrSetType = [&](Type type) -> Type {
6021- if (auto eltTy = type->isArrayType ())
6021+ if (auto eltTy = type->getArrayElementType ())
60226022 return getArrayOrSetType(eltTy);
60236023
60246024 if (auto eltTy = isSetType(type))
@@ -7992,7 +7992,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
79927992 if (inoutBaseType->isTypeVariableOrMember())
79937993 return formUnsolvedResult();
79947994
7995- auto baseIsArray = inoutBaseType->isArrayType ();
7995+ auto baseIsArray = inoutBaseType->isArray ();
79967996
79977997 if (baseIsArray)
79987998 conversionsOrFixes.push_back(
@@ -8061,7 +8061,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
80618061 if (pointerKind == PTK_UnsafePointer
80628062 || pointerKind == PTK_UnsafeRawPointer) {
80638063 if (!isAutoClosureArgument) {
8064- if (type1->isArrayType ()) {
8064+ if (type1->isArray ()) {
80658065 conversionsOrFixes.push_back(
80668066 ConversionRestrictionKind::ArrayToPointer);
80678067
@@ -9263,7 +9263,7 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyTransitivelyConformsTo(
92639263 }
92649264
92659265 // Array<T> -> Unsafe{Raw}Pointer<T>
9266- if (auto elt = resolvedTy->isArrayType ()) {
9266+ if (auto elt = resolvedTy->getArrayElementType ()) {
92679267 typesToCheck.push_back(getPointerFor(PTK_UnsafePointer, elt));
92689268 typesToCheck.push_back(getPointerFor(PTK_UnsafeRawPointer, elt));
92699269 }
@@ -9294,7 +9294,7 @@ static CheckedCastKind getCheckedCastKind(ConstraintSystem *cs,
92949294 Type fromType,
92959295 Type toType) {
92969296 // Array downcasts are handled specially.
9297- if (fromType->isArrayType () && toType->isArrayType ()) {
9297+ if (fromType->isArray () && toType->isArray ()) {
92989298 return CheckedCastKind::ArrayDowncast;
92999299 }
93009300
@@ -9558,8 +9558,8 @@ ConstraintSystem::simplifyCheckedCastConstraint(
95589558 auto kind = getCheckedCastKind(this, fromType, toType);
95599559 switch (kind) {
95609560 case CheckedCastKind::ArrayDowncast: {
9561- auto fromBaseType = fromType->isArrayType ();
9562- auto toBaseType = toType->isArrayType ();
9561+ auto fromBaseType = fromType->getArrayElementType ();
9562+ auto toBaseType = toType->getArrayElementType ();
95639563
95649564 auto elementLocator =
95659565 locator.withPathElement(LocatorPathElt::GenericArgument(0));
@@ -12558,8 +12558,8 @@ ConstraintSystem::simplifyBridgingConstraint(Type type1,
1255812558 };
1255912559
1256012560 // Bridging the elements of an array.
12561- if (auto fromElement = unwrappedFromType->isArrayType ()) {
12562- if (auto toElement = unwrappedToType->isArrayType ()) {
12561+ if (auto fromElement = unwrappedFromType->getArrayElementType ()) {
12562+ if (auto toElement = unwrappedToType->getArrayElementType ()) {
1256312563 countOptionalInjections();
1256412564 auto result = simplifyBridgingConstraint(
1256512565 fromElement, toElement, subflags,
@@ -14838,7 +14838,7 @@ ConstraintSystem::simplifyRestrictedConstraintImpl(
1483814838
1483914839 auto t2 = type2->getDesugaredType();
1484014840
14841- auto baseType1 = getFixedTypeRecursive(obj1->isArrayType (), false);
14841+ auto baseType1 = getFixedTypeRecursive(obj1->getArrayElementType (), false);
1484214842 auto ptr2 = getBaseTypeForPointer(t2);
1484314843
1484414844 increaseScore(SK_ValueToOptional, locator, ptr2.getInt());
@@ -14941,7 +14941,7 @@ ConstraintSystem::simplifyRestrictedConstraintImpl(
1494114941
1494214942 increaseScore(SK_ValueToPointerConversion, locator);
1494314943
14944- type1 = getFixedTypeRecursive(type1->getInOutObjectType()->isArrayType (),
14944+ type1 = getFixedTypeRecursive(type1->getInOutObjectType()->getArrayElementType (),
1494514945 /*wantRValue=*/false);
1494614946 LLVM_FALLTHROUGH;
1494714947 }
@@ -14977,8 +14977,8 @@ ConstraintSystem::simplifyRestrictedConstraintImpl(
1497714977
1497814978 // T < U or T is bridged to V where V < U ===> Array<T> <c Array<U>
1497914979 case ConversionRestrictionKind::ArrayUpcast: {
14980- Type baseType1 = type1->isArrayType ();
14981- Type baseType2 = type2->isArrayType ();
14980+ Type baseType1 = type1->getArrayElementType ();
14981+ Type baseType2 = type2->getArrayElementType ();
1498214982
1498314983 increaseScore(SK_CollectionUpcastConversion, locator);
1498414984 return matchTypes(baseType1,
@@ -15774,7 +15774,7 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyFixConstraint(
1577415774 auto dictionaryKeyTy = DependentMemberType::get(valueBaseTy, keyAssocTy);
1577515775
1577615776 // Extract the array element type.
15777- auto elemTy = type1->isArrayType ();
15777+ auto elemTy = type1->getArrayElementType ();
1577815778
1577915779 ConstraintLocator *elemLoc = getConstraintLocator(AE->getElement(0));
1578015780 ConstraintKind kind = isDictionaryType(dictTy)
0 commit comments