@@ -927,13 +927,12 @@ InvertibleAnnotationRequest::evaluate(Evaluator &evaluator,
927927
928928 switch (TARGET) {
929929 case InvertibleProtocolKind::Copyable:
930- // Handle the legacy '@_moveOnly' attribute
931- if (auto attr = decl->getAttrs ().getAttribute <MoveOnlyAttr>()) {
932- assert ((isa<StructDecl, EnumDecl, ClassDecl>(decl)));
933-
934- return InverseMarking::forInverse (Kind::LegacyExplicit,
935- attr->getLocation ());
936- }
930+ // Handle the legacy '@_moveOnly' for types they can validly appear.
931+ // TypeCheckAttr handles the illegal situations for us.
932+ if (auto attr = decl->getAttrs ().getAttribute <MoveOnlyAttr>())
933+ if (isa<StructDecl, EnumDecl, ClassDecl>(decl))
934+ return InverseMarking::forInverse (Kind::LegacyExplicit,
935+ attr->getLocation ());
937936 break ;
938937
939938 case InvertibleProtocolKind::Escapable:
@@ -2559,7 +2558,8 @@ static Type validateParameterType(ParamDecl *decl) {
25592558 }
25602559
25612560 // Validate the presence of ownership for a parameter with an inverse applied.
2562- if (diagnoseMissingOwnership (ctx, dc, ownership,
2561+ if (!Ty->hasUnboundGenericType () &&
2562+ diagnoseMissingOwnership (ctx, dc, ownership,
25632563 decl->getTypeRepr (), Ty, options)) {
25642564 decl->setInvalid ();
25652565 return ErrorType::get (ctx);
0 commit comments