Skip to content

Commit e918422

Browse files
committed
Sema: Remove commented out code and fix line breaks
1 parent f2fff10 commit e918422

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,7 +1780,8 @@ maybeNoteMutatingMethodSuggestion(ASTContext &C,
17801780

17811781
if (useKind != VarRefUseEnv::Mutating) {
17821782
// This note is tailored for the 'mutating' access, i.e. when
1783-
// attempting to mutate a property, they should instead make an actor method to perform the mutation. Reading properties does not have the same restriction.
1783+
// attempting to mutate a property, they should instead make an actor method
1784+
// to perform the mutation. Reading properties does not have the same restriction.
17841785
return;
17851786
}
17861787

@@ -1791,21 +1792,10 @@ maybeNoteMutatingMethodSuggestion(ASTContext &C,
17911792
}
17921793

17931794
if (auto actor = isolation.getActor()) {
1794-
NominalTypeDecl *actorTy =
1795-
actor;
1796-
// (isolation.getKind() == swift::ActorIsolation::ActorInstance ?
1797-
//)
1798-
17991795
C.Diags.diagnose(
18001796
memberLoc,
18011797
diag::note_consider_method_for_isolated_property_mutation,
18021798
actor);
1803-
// } else if (isolation.getKind() == swift::ActorIsolation::GlobalActor) {
1804-
// C.Diags.diagnose(
1805-
// memberLoc,
1806-
// diag::note_consider_method_for_global_actor_isolated_property_mutation,
1807-
// isolation.getGlobalActor());
1808-
// }
18091799
}
18101800
}
18111801

@@ -1823,7 +1813,8 @@ static void noteIsolatedActorMember(ValueDecl const *decl,
18231813
if (isDistributedActor) {
18241814
if (auto varDecl = dyn_cast<VarDecl>(decl)) {
18251815
if (varDecl->isDistributed()) {
1826-
// This is an attempt to access a `distributed var` synchronously, so offer a more detailed error
1816+
// This is an attempt to access a `distributed var` synchronously, so
1817+
// offer a more detailed error
18271818
decl->diagnose(diag::distributed_actor_synchronous_access_distributed_computed_property,
18281819
decl,
18291820
nominal->getName());

0 commit comments

Comments
 (0)