Skip to content

Commit 22646bd

Browse files
committed
Fix AbstractionPattern::isNoncopyable to handle archetypes.
This fixes TypeLowering for ~Copyable generics, such as: struct S<T: ~Copyable>: ~Copyable { var x: T } extension S: Copyable where T: Copyable {} func foo<T>(s: S<T>) -> () Previously, TypeLowering would ignore the implicit Copyable requirement on the archetype 'T'.
1 parent 8981f2d commit 22646bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SIL/IR/AbstractionPattern.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ bool AbstractionPattern::isNoncopyable(CanType substTy) const {
290290

291291
auto isDefinitelyCopyable = [&](CanType t) -> bool {
292292
auto result = copyable->getParentModule()
293-
->checkConformanceWithoutContext(substTy, copyable,
293+
->checkConformanceWithoutContext(t, copyable,
294294
/*allowMissing=*/false);
295295
return result.has_value() && !result.value().isInvalid();
296296
};

0 commit comments

Comments
 (0)