@@ -3958,8 +3958,9 @@ TypeResolver::resolveASTFunctionTypeParams(TupleTypeRepr *inputRepr,
39583958 }
39593959
39603960 // Validate the presence of ownership for a noncopyable parameter.
3961+ // FIXME: This won't diagnose if the type contains unbound generics.
39613962 if (inStage (TypeResolutionStage::Interface)
3962- && !ty->hasUnboundGenericType ()) {
3963+ && !ty->hasUnboundGenericType () && !ty-> hasTypeVariable () ) {
39633964 diagnoseMissingOwnership (ownership, eltTypeRepr, ty, resolution);
39643965
39653966 // @_staticExclusiveOnly types cannot be passed as 'inout' in function
@@ -5709,6 +5710,7 @@ NeverNullType TypeResolver::resolveVarargType(VarargTypeRepr *repr,
57095710 }
57105711
57115712 // do not allow move-only types as the element of a vararg
5713+ // FIXME: This does not correctly handle type variables and unbound generics.
57125714 if (inStage (TypeResolutionStage::Interface)) {
57135715 auto contextTy = GenericEnvironment::mapTypeIntoContext (
57145716 resolution.getGenericSignature ().getGenericEnvironment (), element);
@@ -5895,6 +5897,7 @@ NeverNullType TypeResolver::resolveTupleType(TupleTypeRepr *repr,
58955897 // Track the presence of a noncopyable field for diagnostic purposes only.
58965898 // We don't need to re-diagnose if a tuple contains another tuple, though,
58975899 // since we should've diagnosed the inner tuple already.
5900+ // FIXME: This won't diagnose if the type contains unbound generics
58985901 if (!ctx.LangOpts .hasFeature (Feature::MoveOnlyTuples) &&
58995902 !options.contains (TypeResolutionFlags::SILMode) &&
59005903 inStage (TypeResolutionStage::Interface) &&
0 commit comments