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(
977
977
assert (AFT != nullptr );
978
978
979
979
// 'async'.
980
- if (forceAsync || (AFD && AFD->hasAsync ()) || AFT->isAsync ())
980
+ if (forceAsync || (AFD && AFD->hasAsync ()) ||
981
+ (AFT->hasExtInfo () && AFT->isAsync ()))
981
982
Builder.addAnnotatedAsync ();
982
983
983
984
// 'throws' or 'rethrows'.
984
985
if (AFD && AFD->getAttrs ().hasAttribute <RethrowsAttr>())
985
986
Builder.addAnnotatedRethrows ();
986
- else if (AFT->isThrowing ())
987
+ else if (AFT->hasExtInfo () && AFT-> isThrowing ())
987
988
Builder.addAnnotatedThrows ();
988
989
}
989
990
@@ -1146,7 +1147,8 @@ void CompletionLookup::addFunctionCallPattern(
1146
1147
else
1147
1148
addTypeAnnotation (Builder, AFT->getResult (), genericSig);
1148
1149
1149
- if (!isForCaching () && AFT->isAsync () && !CanCurrDeclContextHandleAsync) {
1150
+ if (!isForCaching () && AFT->hasExtInfo () && AFT->isAsync () &&
1151
+ !CanCurrDeclContextHandleAsync) {
1150
1152
Builder.setContextualNotRecommended (
1151
1153
ContextualNotRecommendedReason::InvalidAsyncContext);
1152
1154
}
You can’t perform that action at this time.
0 commit comments