@@ -561,7 +561,7 @@ class LocalVariableInitialization : public SingleBufferInitialization {
561
561
562
562
// If our instance type is not already @moveOnly wrapped, and it's a
563
563
// no-implicit-copy parameter, wrap it.
564
- if (!isNoImplicitCopy && ! instanceType->isNoncopyable ()) {
564
+ if (!isNoImplicitCopy && instanceType->isCopyable ()) {
565
565
if (auto *pd = dyn_cast<ParamDecl>(decl)) {
566
566
isNoImplicitCopy = pd->isNoImplicitCopy ();
567
567
isNoImplicitCopy |= pd->getSpecifier () == ParamSpecifier::Consuming;
@@ -577,7 +577,7 @@ class LocalVariableInitialization : public SingleBufferInitialization {
577
577
}
578
578
}
579
579
580
- const bool isCopyable = isNoImplicitCopy || ! instanceType->isNoncopyable ();
580
+ const bool isCopyable = isNoImplicitCopy || instanceType->isCopyable ();
581
581
582
582
auto boxType = SGF.SGM .Types .getContextBoxTypeForCapture (
583
583
decl, instanceType, SGF.F .getGenericEnvironment (),
@@ -1548,7 +1548,7 @@ SILGenFunction::emitInitializationForVarDecl(VarDecl *vd, bool forceImmutable,
1548
1548
// If this is a 'let' initialization for a copyable non-global, set up a let
1549
1549
// binding, which stores the initialization value into VarLocs directly.
1550
1550
if (forceImmutable && vd->getDeclContext ()->isLocalContext () &&
1551
- !isa<ReferenceStorageType>(varType) && ! varType->isNoncopyable ())
1551
+ !isa<ReferenceStorageType>(varType) && varType->isCopyable ())
1552
1552
return InitializationPtr (new LetValueInitialization (vd, *this ));
1553
1553
1554
1554
// If the variable has no initial value, emit a mark_uninitialized instruction
0 commit comments