Delete TypeChecker::validateType

Inline it into its final user: swift::performTypeLocChecking
This commit is contained in:
Robert Widmann
2020-06-10 19:27:47 -07:00
parent 29cdbe87f1
commit 8f065e7a61
8 changed files with 16 additions and 27 deletions

View File

@@ -1495,12 +1495,14 @@ namespace {
Type resolveTypeReferenceInExpression(TypeRepr *repr,
TypeResolverContext resCtx) {
TypeLoc loc(repr);
TypeResolutionOptions options(resCtx);
options |= TypeResolutionFlags::AllowUnboundGenerics;
bool hadError = TypeChecker::validateType(
loc, TypeResolution::forContextual(CS.DC, options));
return hadError ? Type() : loc.getType();
auto result = TypeResolution::forContextual(CS.DC, options)
.resolveType(repr);
if (!result || result->hasError()) {
return Type();
}
return result;
}
Type visitTypeExpr(TypeExpr *E) {