mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[CodeCompletion] Make sure callback is always called from performOperation
We had some situations left that neither returned an error, nor called the callback with results in `performOperation`. Return an error in these and adjust the tests to correctly match the error.
This commit is contained in:
@@ -81,6 +81,12 @@ static void swiftConformingMethodListImpl(
|
||||
ide::makeConformingMethodListCallbacksFactory(ExpectedTypeNames,
|
||||
Consumer));
|
||||
|
||||
if (!Result->DidFindCodeCompletionToken) {
|
||||
Callback(ResultType::success(
|
||||
{/*Results=*/nullptr, Result->DidReuseAST}));
|
||||
return;
|
||||
}
|
||||
|
||||
performCodeCompletionSecondPass(*Result->CI.getCodeCompletionFile(),
|
||||
*callbacksFactory);
|
||||
if (!Consumer.HandleResultWasCalled) {
|
||||
|
||||
Reference in New Issue
Block a user