Skip to content

Commit 82ba4df

Browse files
committed
Look through type sugar in ConstraintSystem::openBindingType().
1 parent 87a5e4d commit 82ba4df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ Type ConstraintSystem::openBindingType(Type type,
714714
Type result = openType(type, locator);
715715

716716
if (isArrayType(type)) {
717-
auto boundStruct = cast<BoundGenericStructType>(type.getPointer());
717+
auto boundStruct = type->getAs<BoundGenericStructType>();
718718
if (auto replacement = getTypeChecker().getArraySliceType(
719719
SourceLoc(), boundStruct->getGenericArgs()[0])) {
720720
return replacement;

0 commit comments

Comments
 (0)