mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema: Avoid adding nonisolated twice to synthesized Hashable methods.
https://github.com/apple/swift/pull/42041 introduced a centralized mechanism for adding the `nonisolated` attribute to synthesized decls but did not clean up the existing code that was already doing so for `Hashable` conformances. Resolves rdar://102106591
This commit is contained in:
@@ -1605,13 +1605,14 @@ bool swift::hasLetStoredPropertyWithInitialValue(NominalTypeDecl *nominal) {
|
||||
});
|
||||
}
|
||||
|
||||
void swift::addNonIsolatedToSynthesized(
|
||||
NominalTypeDecl *nominal, ValueDecl *value) {
|
||||
bool swift::addNonIsolatedToSynthesized(NominalTypeDecl *nominal,
|
||||
ValueDecl *value) {
|
||||
if (!getActorIsolation(nominal).isActorIsolated())
|
||||
return;
|
||||
return false;
|
||||
|
||||
ASTContext &ctx = nominal->getASTContext();
|
||||
value->getAttrs().add(new (ctx) NonisolatedAttr(/*isImplicit=*/true));
|
||||
return true;
|
||||
}
|
||||
|
||||
static std::pair<BraceStmt *, /*isTypeChecked=*/bool>
|
||||
|
||||
Reference in New Issue
Block a user