[Type checker] Move TypeChecker::resolveType() into TypeResolution.

Now that type resolution is (almost completely) separated from the type
checker instance, move resolveType() out to TypeResolution where it
belongs.
This commit is contained in:
Doug Gregor
2018-08-20 22:31:59 -07:00
parent 0eaa00a470
commit 8dc20dfcac
10 changed files with 288 additions and 293 deletions

View File

@@ -1848,8 +1848,8 @@ static void maybeAddAccessorsToBehaviorStorage(TypeChecker &TC, VarDecl *var) {
};
// Try to resolve the behavior to a protocol.
auto behaviorType = TC.resolveType(behavior->ProtocolName,
TypeResolution::forContextual(dc), None);
auto resolution = TypeResolution::forContextual(dc);
auto behaviorType = resolution.resolveType(behavior->ProtocolName, None);
if (!behaviorType) {
return makeBehaviorAccessors();
}