Skip to content

Commit c3f9b6f

Browse files
committed
NCGenerics: avoid UGT's in isNoncopyable
1 parent 73e176c commit c3f9b6f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Sema/TypeCheckType.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3764,6 +3764,7 @@ TypeResolver::resolveASTFunctionTypeParams(TupleTypeRepr *inputRepr,
37643764

37653765
// Validate the presence of ownership for a noncopyable parameter.
37663766
if (inStage(TypeResolutionStage::Interface)
3767+
&& !ty->hasUnboundGenericType()
37673768
&& !options.contains(TypeResolutionFlags::SILMode)) {
37683769
diagnoseMissingOwnership(getASTContext(), dc, ownership,
37693770
eltTypeRepr, ty, options);
@@ -5303,6 +5304,7 @@ NeverNullType TypeResolver::resolveTupleType(TupleTypeRepr *repr,
53035304
// since we should've diagnosed the inner tuple already.
53045305
if (inStage(TypeResolutionStage::Interface)
53055306
&& !options.contains(TypeResolutionFlags::SILMode)
5307+
&& !ty->hasUnboundGenericType()
53065308
&& isInterfaceTypeNoncopyable(ty, dc->getGenericEnvironmentOfContext())
53075309
&& !ctx.LangOpts.hasFeature(Feature::MoveOnlyTuples)
53085310
&& !moveOnlyElementIndex.has_value() && !isa<TupleTypeRepr>(tyR)) {

0 commit comments

Comments
 (0)