Sema: Clean up named opaque result type generic signature construction

We were building the signature twice, and adding the 'where' clause twice
each time.

The GSB magically uniqued them, whereas the Requirement Machine is not
so forgiving.
This commit is contained in:
Slava Pestov
2022-03-31 23:20:47 -04:00
parent 4e89f73e90
commit fab37712ad
3 changed files with 9 additions and 6 deletions

View File

@@ -3567,6 +3567,8 @@ public:
auto genericSig = MF.getGenericSignature(genericSigID);
if (genericSig)
opaqueDecl->setGenericSignature(genericSig);
else
opaqueDecl->setGenericSignature(GenericSignature());
if (underlyingTypeSubsID) {
auto subMapOrError = MF.getSubstitutionMapChecked(underlyingTypeSubsID);
if (!subMapOrError)