Skip to content

Commit 26452ba

Browse files
committed
canonicalize before matching on a type in isPureMoveOnly
1 parent 591d128 commit 26452ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/Type.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ bool TypeBase::isPureMoveOnly() {
170170
return nom->isMoveOnly();
171171

172172
// if any components of the tuple are move-only, then the tuple is move-only.
173-
if (auto *tupl = getAs<TupleType>()) {
173+
if (auto *tupl = getCanonicalType()->getAs<TupleType>()) {
174174
for (auto eltTy : tupl->getElementTypes())
175175
if (eltTy->isPureMoveOnly())
176176
return true;

0 commit comments

Comments
 (0)