mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
use new llvm::Optional API
`getValue` -> `value` `getValueOr` -> `value_or` `hasValue` -> `has_value` `map` -> `transform` The old API will be deprecated in the rebranch. To avoid merge conflicts, use the new API already in the main branch. rdar://102362022
This commit is contained in:
@@ -4475,7 +4475,7 @@ static bool diagnoseAmbiguity(
|
||||
} else if (llvm::all_of(solution.Fixes, [&](ConstraintFix *fix) {
|
||||
return fix->getLocator()
|
||||
->findLast<LocatorPathElt::ApplyArgument>()
|
||||
.hasValue();
|
||||
.has_value();
|
||||
})) {
|
||||
// All fixes have to do with arguments, so let's show the parameter
|
||||
// lists.
|
||||
@@ -6874,7 +6874,7 @@ bool ConstraintSystem::isReadOnlyKeyPathComponent(
|
||||
ExportContext where = ExportContext::forFunctionBody(DC, referenceLoc);
|
||||
auto maybeUnavail =
|
||||
TypeChecker::checkDeclarationAvailability(setter, where);
|
||||
if (maybeUnavail.hasValue()) {
|
||||
if (maybeUnavail.has_value()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user