File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -977,13 +977,14 @@ void CompletionLookup::addEffectsSpecifiers(
977977 assert (AFT != nullptr );
978978
979979 // 'async'.
980- if (forceAsync || (AFD && AFD->hasAsync ()) || AFT->isAsync ())
980+ if (forceAsync || (AFD && AFD->hasAsync ()) ||
981+ (AFT->hasExtInfo () && AFT->isAsync ()))
981982 Builder.addAnnotatedAsync ();
982983
983984 // 'throws' or 'rethrows'.
984985 if (AFD && AFD->getAttrs ().hasAttribute <RethrowsAttr>())
985986 Builder.addAnnotatedRethrows ();
986- else if (AFT->isThrowing ())
987+ else if (AFT->hasExtInfo () && AFT-> isThrowing ())
987988 Builder.addAnnotatedThrows ();
988989}
989990
@@ -1146,7 +1147,8 @@ void CompletionLookup::addFunctionCallPattern(
11461147 else
11471148 addTypeAnnotation (Builder, AFT->getResult (), genericSig);
11481149
1149- if (!isForCaching () && AFT->isAsync () && !CanCurrDeclContextHandleAsync) {
1150+ if (!isForCaching () && AFT->hasExtInfo () && AFT->isAsync () &&
1151+ !CanCurrDeclContextHandleAsync) {
11501152 Builder.setContextualNotRecommended (
11511153 ContextualNotRecommendedReason::InvalidAsyncContext);
11521154 }
You can’t perform that action at this time.
0 commit comments