We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c41310 commit 1e723ddCopy full SHA for 1e723dd
lib/Sema/CSBindings.cpp
@@ -2297,6 +2297,12 @@ bool TypeVariableBinding::attempt(ConstraintSystem &cs) const {
2297
if (TypeVar->getImpl().getGenericParameter())
2298
return false;
2299
2300
+ // Don't penalize solutions if we couldn't determine the type of the code
2301
+ // completion token. We still want to examine the surrounding types in
2302
+ // that case.
2303
+ if (TypeVar->getImpl().isCodeCompletionToken())
2304
+ return false;
2305
+
2306
// Don't penalize solutions with holes due to missing arguments after the
2307
// code completion position.
2308
auto argLoc = srcLocator->findLast<LocatorPathElt::SynthesizedArgument>();
0 commit comments