File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
lib/AST/RequirementMachine Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -757,8 +757,11 @@ void swift::rewriting::applyInverses(
757757
758758 // Inverses on associated types are experimental.
759759 if (!allowInverseOnAssocType && canSubject->is <DependentMemberType>()) {
760- errors.push_back (RequirementError::forInvalidInverseSubject (inverse));
761- continue ;
760+ // Special exception: allow if we're building the stdlib.
761+ if (!ctx.MainModule ->isStdlibModule ()) {
762+ errors.push_back (RequirementError::forInvalidInverseSubject (inverse));
763+ continue ;
764+ }
762765 }
763766
764767 // Noncopyable checking support for parameter packs is not implemented yet.
Original file line number Diff line number Diff line change 1+ // RUN: %target-typecheck-verify-swift -parse-stdlib -module-name Swift -enable-experimental-feature NoncopyableGenerics
2+
3+ public protocol Hello {
4+ associatedtype Req : ~ Copyable
5+ }
You can’t perform that action at this time.
0 commit comments