Skip to content

Commit a8bca07

Browse files
committed
AST: Fix handling of pack conformance requirements in RequirementEnvironment
If a generic signature states a requirement `each T: P`, we must wrap the abstract conformance in a pack conformance first. We let this slide before, but it's now flagged by SubstitutionMap::verify().
1 parent 9d09f93 commit a8bca07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/RequirementEnvironment.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ RequirementEnvironment::RequirementEnvironment(
152152

153153
// All other generic parameters come from the requirement itself
154154
// and conform abstractly.
155-
return ProtocolConformanceRef(proto);
155+
return MakeAbstractConformanceForGenericType()(type, replacement, proto);
156156
});
157157

158158
// If the requirement itself is non-generic, the witness thunk signature

0 commit comments

Comments
 (0)