AST: Remove GenericContext::setGenericEnvironment()

This was a transitional step before converting all callers to
store a generic signature instead of an environment.
This commit is contained in:
Slava Pestov
2019-09-05 18:17:58 -04:00
parent 0405ab5ffc
commit f292c1b240
16 changed files with 59 additions and 94 deletions

View File

@@ -761,8 +761,7 @@ static FuncDecl *deriveEncodable_encode(DerivedConformance &derived) {
encodeDecl->getAttrs().add(attr);
}
if (auto env = conformanceDC->getGenericEnvironmentOfContext())
encodeDecl->setGenericEnvironment(env);
encodeDecl->setGenericSignature(conformanceDC->getGenericSignatureOfContext());
encodeDecl->computeType(FunctionType::ExtInfo().withThrows());
encodeDecl->setValidationToChecked();
@@ -1043,8 +1042,7 @@ static ValueDecl *deriveDecodable_init(DerivedConformance &derived) {
initDecl->getAttrs().add(reqAttr);
}
if (auto env = conformanceDC->getGenericEnvironmentOfContext())
initDecl->setGenericEnvironment(env);
initDecl->setGenericSignature(conformanceDC->getGenericSignatureOfContext());
initDecl->computeType(AnyFunctionType::ExtInfo().withThrows());
initDecl->setValidationToChecked();