[NFC] Move resolveTypeInContext to TypeResolution

This commit is contained in:
Robert Widmann
2021-03-31 15:12:24 -07:00
parent 876a0eec94
commit fe959c55b2
4 changed files with 41 additions and 46 deletions

View File

@@ -1291,12 +1291,12 @@ ConstraintSystem::getTypeOfReference(ValueDecl *value,
// Unqualified reference to a type.
if (auto typeDecl = dyn_cast<TypeDecl>(value)) {
// Resolve the reference to this type declaration in our current context.
auto type = TypeChecker::resolveTypeInContext(
typeDecl, nullptr,
auto type =
TypeResolution::forContextual(useDC, TypeResolverContext::InExpression,
/*unboundTyOpener*/ nullptr,
/*placeholderHandler*/ nullptr),
/*isSpecialized=*/false);
/*placeholderHandler*/ nullptr)
.resolveTypeInContext(typeDecl, /*foundDC*/ nullptr,
/*isSpecialized=*/false);
checkNestedTypeConstraints(*this, type, locator);