@@ -212,7 +212,9 @@ class NodeFinder : ASTWalker {
212
212
if (auto CaptureList = dyn_cast<CaptureListExpr>(E)) {
213
213
for (auto ShorthandShadows :
214
214
getShorthandShadows (CaptureList, getCurrentDeclContext ())) {
215
- assert (ShorthandShadowedDecls.count (ShorthandShadows.first ) == 0 );
215
+ assert (ShorthandShadowedDecls.count (ShorthandShadows.first ) == 0 ||
216
+ ShorthandShadowedDecls[ShorthandShadows.first ] ==
217
+ ShorthandShadows.second );
216
218
ShorthandShadowedDecls[ShorthandShadows.first ] =
217
219
ShorthandShadows.second ;
218
220
}
@@ -367,10 +369,12 @@ class CursorInfoDoneParsingCallback : public IDEInspectionCallbacks {
367
369
368
370
// Type check the statemnt containing E and listen for solutions.
369
371
CursorInfoTypeCheckSolutionCallback Callback (*SrcFile, RequestedLoc);
370
- llvm::SaveAndRestore<TypeCheckCompletionCallback *> CompletionCollector (
371
- DC->getASTContext ().SolutionCallback , &Callback);
372
- typeCheckASTNodeAtLoc (TypeCheckASTNodeAtLocContext::declContext (DC),
373
- E->getLoc ());
372
+ {
373
+ llvm::SaveAndRestore<TypeCheckCompletionCallback *> CompletionCollector (
374
+ DC->getASTContext ().SolutionCallback , &Callback);
375
+ typeCheckASTNodeAtLoc (TypeCheckASTNodeAtLocContext::declContext (DC),
376
+ E->getLoc ());
377
+ }
374
378
375
379
if (Callback.getResults ().empty ()) {
376
380
// No results.
@@ -388,6 +392,11 @@ class CursorInfoDoneParsingCallback : public IDEInspectionCallbacks {
388
392
SmallVector<ResolvedCursorInfoPtr> Results;
389
393
for (auto Res : Callback.getResults ()) {
390
394
SmallVector<NominalTypeDecl *> ReceiverTypes;
395
+ if (isa<ModuleDecl>(Res.ReferencedDecl )) {
396
+ // ResolvedModuleRefCursorInfo is not supported by solver-based cursor
397
+ // info yet.
398
+ continue ;
399
+ }
391
400
if (Res.IsDynamicRef && Res.BaseType ) {
392
401
if (auto ReceiverType = Res.BaseType ->getAnyNominal ()) {
393
402
ReceiverTypes = {ReceiverType};
0 commit comments