Skip to content

Commit

Permalink
[CodeCompletion] Adjust DotExprLookup::sawSolution to use new `Solu…
Browse files Browse the repository at this point in the history
…tion` APIs
  • Loading branch information
xedin authored and nathawes committed Aug 29, 2020
1 parent fe9df72 commit a49404d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/Sema/TypeCheckCodeCompletion.cpp
Expand Up @@ -708,9 +708,7 @@ void DotExprLookup::sawSolution(const constraints::Solution &S) {
GotCallback = true;
auto &CS = S.getConstraintSystem();

auto GetType = [&](Expr *E) {
return S.simplifyType(S.getType(E));
};
auto GetType = [&](Expr *E) { return S.getResolvedType(E); };

auto *ParsedExpr = CompletionExpr->getBase();
auto *SemanticExpr = ParsedExpr->getSemanticsProvidingExpr();
Expand All @@ -726,7 +724,7 @@ void DotExprLookup::sawSolution(const constraints::Solution &S) {
if (auto SelectedOverload = S.getOverloadChoiceIfAvailable(CalleeLocator))
ReferencedDecl = SelectedOverload->choice.getDeclOrNull();

bool ISDMT = CS.isStaticallyDerivedMetatype(ParsedExpr);
bool ISDMT = S.isStaticallyDerivedMetatype(ParsedExpr);
auto Key = std::make_pair(BaseTy, ReferencedDecl);
auto Ret = ResultToIndex.insert({Key, Solutions.size()});
if (!Ret.second && ExpectedTy)
Expand Down

0 comments on commit a49404d

Please sign in to comment.