Skip to content

Commit 63d65b0

Browse files
committed
Look through type sugar in ConstraintSystem::openBindingType().
(cherry picked from commit 82ba4df)
1 parent a172ef4 commit 63d65b0

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
@@ -722,7 +722,7 @@ Type ConstraintSystem::openBindingType(Type type,
722722
Type result = openType(type, locator);
723723

724724
if (isArrayType(type)) {
725-
auto boundStruct = cast<BoundGenericStructType>(type.getPointer());
725+
auto boundStruct = type->getAs<BoundGenericStructType>();
726726
if (auto replacement = getTypeChecker().getArraySliceType(
727727
SourceLoc(), boundStruct->getGenericArgs()[0])) {
728728
return replacement;

0 commit comments

Comments
 (0)