Skip to content

Commit 0e1638d

Browse files
committed
Adjust for 5.5 branch
1 parent ecff1fa commit 0e1638d

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,7 +1574,6 @@ namespace {
15741574
var, isolation.getGlobalActor());
15751575

15761576
case ActorIsolation::ActorInstance:
1577-
case ActorIsolation::DistributedActorInstance:
15781577
// FIXME: Local functions could presumably capture an isolated
15791578
// parameter that isn't'self'.
15801579
if (isPotentiallyIsolated &&
@@ -2424,7 +2423,7 @@ namespace {
24242423

24252424
// An escaping partial application of something that is part of
24262425
// the actor's isolated state is never permitted.
2427-
if (partialApply && partialApply->isEscaping) {
2426+
if (isEscapingPartialApply) {
24282427
ctx.Diags.diagnose(
24292428
memberLoc, diag::actor_isolated_partial_apply,
24302429
member->getDescriptiveKind(),
@@ -3031,9 +3030,7 @@ ActorIsolation ActorIsolationRequest::evaluate(
30313030
if (evaluateOrDefault(evaluator, HasIsolatedSelfRequest{value}, false)) {
30323031
auto actor = value->getDeclContext()->getSelfNominalTypeDecl();
30333032
assert(actor && "could not find the actor that 'self' is isolated to");
3034-
return actor->isDistributedActor()
3035-
? ActorIsolation::forDistributedActorInstance(actor)
3036-
: ActorIsolation::forActorInstance(actor);
3033+
return ActorIsolation::forActorInstance(actor);
30373034
}
30383035

30393036
// If this declaration has one of the actor isolation attributes, report
@@ -3244,7 +3241,6 @@ bool HasIsolatedSelfRequest::evaluate(
32443241
return false;
32453242

32463243
case ActorIsolation::ActorInstance:
3247-
case ActorIsolation::DistributedActorInstance:
32483244
if (isolation.getActor() != selfTypeDecl)
32493245
return false;
32503246
break;
@@ -3288,8 +3284,7 @@ void swift::checkOverrideActorIsolation(ValueDecl *value) {
32883284

32893285
// If both are actor-instance isolated, we're done.
32903286
if (isolation.getKind() == overriddenIsolation.getKind() &&
3291-
(isolation.getKind() == ActorIsolation::ActorInstance ||
3292-
isolation.getKind() == ActorIsolation::DistributedActorInstance))
3287+
isolation.getKind() == ActorIsolation::ActorInstance)
32933288
return;
32943289

32953290
// If the overridden declaration is from Objective-C with no actor annotation,

test/Concurrency/actor_call_implicitly_async.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ actor BankAccount {
3434
}
3535

3636
// NOTE: this func is accessed through both async and sync calls.
37-
// expected-note@+1 {{calls to instance method 'balance()' from outside of its actor context are implicitly asynchronous}}
3837
func balance() -> Int { return curBalance }
3938

40-
// expected-note@+1 2{{calls to instance method 'deposit' from outside of its actor context are implicitly asynchronous}}
39+
// expected-note@+1{{calls to instance method 'deposit' from outside of its actor context are implicitly asynchronous}}
4140
func deposit(_ amount : Int) -> Int {
4241
guard amount >= 0 else { return 0 }
4342

test/IDE/print_clang_objc_async.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ import _Concurrency
9898

9999
// CHECK-LABEL: protocol ProtocolWithSwiftAttributes {
100100
// CHECK-NEXT: @actorIndependent func independentMethod()
101-
// CHECK-NEXT: func asyncHandlerMethod()
102101
// CHECK-NEXT: {{^}} @objc @MainActor func mainActorMethod()
103102
// CHECK-NEXT: {{^}} @objc @MainActor func uiActorMethod()
104103
// CHECK-NEXT: {{^}} @objc optional func missingAtAttributeMethod()

test/Inputs/clang-importer-sdk/usr/include/ObjCConcurrency.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ typedef void (^CompletionHandler)(NSString * _Nullable, NSString * _Nullable_res
9696

9797
@protocol ProtocolWithSwiftAttributes
9898
-(void)independentMethod __attribute__((__swift_attr__("@actorIndependent")));
99-
-(void)asyncHandlerMethod __attribute__((__swift_attr__("@asyncHandler")));
10099
-(void)mainActorMethod __attribute__((__swift_attr__("@MainActor")));
101100
-(void)uiActorMethod __attribute__((__swift_attr__("@UIActor")));
102101

0 commit comments

Comments
 (0)