mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Look through type sugar in ConstraintSystem::openBindingType().
This commit is contained in:
@@ -714,7 +714,7 @@ Type ConstraintSystem::openBindingType(Type type,
|
||||
Type result = openType(type, locator);
|
||||
|
||||
if (isArrayType(type)) {
|
||||
auto boundStruct = cast<BoundGenericStructType>(type.getPointer());
|
||||
auto boundStruct = type->getAs<BoundGenericStructType>();
|
||||
if (auto replacement = getTypeChecker().getArraySliceType(
|
||||
SourceLoc(), boundStruct->getGenericArgs()[0])) {
|
||||
return replacement;
|
||||
|
||||
Reference in New Issue
Block a user