@@ -2890,6 +2890,7 @@ Type ConstraintSystem::getEffectiveOverloadType(ConstraintLocator *locator,
28902890 case OverloadChoiceKind::KeyPathApplication:
28912891 case OverloadChoiceKind::TupleIndex:
28922892 case OverloadChoiceKind::MaterializePack:
2893+ case OverloadChoiceKind::ExtractFunctionIsolation:
28932894 return Type ();
28942895 }
28952896
@@ -3569,6 +3570,7 @@ void ConstraintSystem::bindOverloadType(
35693570 case OverloadChoiceKind::DeclViaUnwrappedOptional:
35703571 case OverloadChoiceKind::TupleIndex:
35713572 case OverloadChoiceKind::MaterializePack:
3573+ case OverloadChoiceKind::ExtractFunctionIsolation:
35723574 case OverloadChoiceKind::KeyPathApplication:
35733575 bindTypeOrIUO (openedType);
35743576 return ;
@@ -3829,6 +3831,15 @@ void ConstraintSystem::resolveOverload(ConstraintLocator *locator,
38293831 break ;
38303832 }
38313833
3834+ case OverloadChoiceKind::ExtractFunctionIsolation: {
3835+ // The type of `.isolation` is `(any Actor)?`
3836+ auto actor = getASTContext ().getProtocol (KnownProtocolKind::Actor);
3837+ adjustedRefType =
3838+ OptionalType::get (actor->getDeclaredExistentialType ());
3839+ refType = adjustedRefType;
3840+ break ;
3841+ }
3842+
38323843 case OverloadChoiceKind::KeyPathApplication: {
38333844 // Key path application looks like a subscript(keyPath: KeyPath<Base, T>).
38343845 // The element type is T or @lvalue T based on the key path subtype and
@@ -4466,6 +4477,7 @@ DeclName OverloadChoice::getName() const {
44664477
44674478 case OverloadChoiceKind::MaterializePack:
44684479 case OverloadChoiceKind::TupleIndex:
4480+ case OverloadChoiceKind::ExtractFunctionIsolation:
44694481 llvm_unreachable (" no name!" );
44704482 }
44714483
@@ -5830,6 +5842,7 @@ bool ConstraintSystem::diagnoseAmbiguity(ArrayRef<Solution> solutions) {
58305842
58315843 case OverloadChoiceKind::TupleIndex:
58325844 case OverloadChoiceKind::MaterializePack:
5845+ case OverloadChoiceKind::ExtractFunctionIsolation:
58335846 // FIXME: Actually diagnose something here.
58345847 break ;
58355848 }
0 commit comments