mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add handling of potentially unavailable overloaded global functions to Sema.
This commit also factors out some common checking and diagnostic code; it additionally moves diagnostic emission for unavailable references from CSGen to CSApply. Swift SVN r22447
This commit is contained in:
@@ -3462,6 +3462,9 @@ Type ConstraintSystem::getBaseTypeForArrayType(TypeBase *type) {
|
||||
}
|
||||
|
||||
Type ConstraintSystem::getTypeWhenUnavailable(Type declType) {
|
||||
if (!TC.getLangOpts().EnableExperimentalUnavailableAsOptional) {
|
||||
return declType;
|
||||
}
|
||||
// Drop lvalue-ness and make optional.
|
||||
return OptionalType::get(declType->getRValueType());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user