Skip to content

Commit 630de94

Browse files
committed
Disable diagnistics in lifetime dependence inference on builtins
1 parent 479c0f4 commit 630de94

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Sema/LifetimeDependence.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,11 @@ LifetimeDependenceInfo::infer(AbstractFunctionDecl *afd, Type resultType) {
470470
continue;
471471
}
472472
if (candidateParam) {
473+
if (auto *fd = dyn_cast<FuncDecl>(afd)) {
474+
if (fd->isImplicit() && fd->getModuleContext()->isBuiltinModule()) {
475+
return std::nullopt;
476+
}
477+
}
473478
diags.diagnose(
474479
returnLoc,
475480
diag::lifetime_dependence_cannot_infer_ambiguous_candidate);

0 commit comments

Comments
 (0)