Merge branch 'main' into allowable-serialization

This commit is contained in:
Xi Ge
2022-11-28 09:36:04 -08:00
committed by GitHub
344 changed files with 1696 additions and 1648 deletions

View File

@@ -1041,7 +1041,7 @@ ScopedImportLookupRequest::evaluate(Evaluator &evaluator,
}
Optional<ImportKind> actualKind = ImportDecl::findBestImportKind(decls);
if (!actualKind.hasValue()) {
if (!actualKind.has_value()) {
// FIXME: print entire module name?
ctx.Diags.diagnose(importLoc, diag::ambiguous_decl_in_module,
accessPath.front().Item, module->getName());
@@ -1144,8 +1144,8 @@ UnboundImport::UnboundImport(
// If either have a `@_documentation(visibility: <access>)` attribute, the
// cross-import has the more restrictive of the two.
if (declaringImport.docVisibility || bystandingImport.docVisibility) {
auto declaringAccess = declaringImport.docVisibility.getValueOr(AccessLevel::Public);
auto bystandingAccess = bystandingImport.docVisibility.getValueOr(AccessLevel::Public);
auto declaringAccess = declaringImport.docVisibility.value_or(AccessLevel::Public);
auto bystandingAccess = bystandingImport.docVisibility.value_or(AccessLevel::Public);
import.docVisibility = std::min(declaringAccess, bystandingAccess);
}
}