Skip to content

Commit cd20dba

Browse files
committed
[Runtime] Don't check suppressible protocols for non-key generic arguments
1 parent af38d88 commit cd20dba

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stdlib/public/runtime/ProtocolConformance.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,6 +1875,11 @@ std::optional<TypeLookupError> swift::_checkGenericRequirements(
18751875
// Now, check all of the generic arguments for suppressible protocols.
18761876
unsigned numGenericParams = genericParams.size();
18771877
for (unsigned index = 0; index != numGenericParams; ++index) {
1878+
// Non-key arguments don't need to be checked, because they are
1879+
// aliased to another type.
1880+
if (!genericParams[index].hasKeyArgument())
1881+
continue;
1882+
18781883
SuppressibleProtocolSet suppressed;
18791884
if (index < allSuppressed.size())
18801885
suppressed = allSuppressed[index];

0 commit comments

Comments
 (0)