IUO: Add overload choice kind for IUO decls.

Add a new OverloadChoiceKind for decls that are either IUO-typed, or
function-typed meaning that the function result type is IUO-typed.

Not currently used, so NFC.
This commit is contained in:
Mark Lacey
2017-12-12 10:32:45 -08:00
parent 4dbf89b91a
commit d1bb36425d
7 changed files with 39 additions and 3 deletions

View File

@@ -1524,7 +1524,8 @@ void ConstraintSystem::resolveOverload(ConstraintLocator *locator,
case OverloadChoiceKind::DeclViaBridge:
case OverloadChoiceKind::DeclViaDynamic:
case OverloadChoiceKind::DeclViaUnwrappedOptional: {
case OverloadChoiceKind::DeclViaUnwrappedOptional:
case OverloadChoiceKind::DeclForImplicitlyUnwrappedOptional: {
bool isDynamicResult
= choice.getKind() == OverloadChoiceKind::DeclViaDynamic;
// Retrieve the type of a reference to the specific declaration choice.
@@ -1825,6 +1826,7 @@ DeclName OverloadChoice::getName() const {
case OverloadChoiceKind::DeclViaDynamic:
case OverloadChoiceKind::DeclViaBridge:
case OverloadChoiceKind::DeclViaUnwrappedOptional:
case OverloadChoiceKind::DeclForImplicitlyUnwrappedOptional:
return getDecl()->getFullName();
case OverloadChoiceKind::KeyPathApplication: {