mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Remove experimental support for treating unavailable symbols as optional.
This has always been off by default and is a language direction we have decided not to pursue. Swift SVN r30355
This commit is contained in:
@@ -1390,17 +1390,6 @@ void ConstraintSystem::resolveOverload(ConstraintLocator *locator,
|
||||
= getTypeOfReference(choice.getDecl(), isTypeReference,
|
||||
choice.isSpecialized(), locator);
|
||||
}
|
||||
|
||||
if (choice.isPotentiallyUnavailable()) {
|
||||
// For the moment, we do not treat constructors as optional
|
||||
// when potentially unavailable, even when
|
||||
// ExperimentalEnableUnavailableAsOptional is turned on.
|
||||
if (choice.getDecl()->getKind() != DeclKind::Constructor) {
|
||||
// Strip lvalue-ness and make type optional to reflect fact
|
||||
// that declaration may not be available.
|
||||
refType = getTypeWhenUnavailable(refType);
|
||||
}
|
||||
}
|
||||
|
||||
if (choice.getDecl()->getAttrs().hasAttribute<OptionalAttr>() &&
|
||||
!isa<SubscriptDecl>(choice.getDecl())) {
|
||||
|
||||
Reference in New Issue
Block a user