@@ -60,7 +60,6 @@ createStoredProperty(ClassDecl *classDecl, ASTContext &ctx,
60
60
61
61
static ValueDecl *deriveDistributedActor_id (DerivedConformance &derived) {
62
62
assert (derived.Nominal ->isDistributedActor ());
63
- auto decl = dyn_cast<ClassDecl>(derived.Nominal );
64
63
auto &C = derived.Context ;
65
64
66
65
// ```
@@ -71,9 +70,8 @@ static ValueDecl *deriveDistributedActor_id(DerivedConformance &derived) {
71
70
72
71
VarDecl *propDecl;
73
72
PatternBindingDecl *pbDecl;
74
- std::tie (propDecl, pbDecl) = createStoredProperty (
75
- decl, C,
76
- VarDecl::Introducer::Let, C.Id_id ,
73
+ std::tie (propDecl, pbDecl) = derived.declareDerivedProperty (
74
+ C.Id_id ,
77
75
propertyType, propertyType,
78
76
/* isStatic=*/ false , /* isFinal=*/ true );
79
77
@@ -88,7 +86,6 @@ static ValueDecl *deriveDistributedActor_id(DerivedConformance &derived) {
88
86
static ValueDecl *deriveDistributedActor_actorTransport (
89
87
DerivedConformance &derived) {
90
88
assert (derived.Nominal ->isDistributedActor ());
91
- auto decl = dyn_cast<ClassDecl>(derived.Nominal );
92
89
auto &C = derived.Context ;
93
90
94
91
// ```
@@ -100,9 +97,8 @@ static ValueDecl *deriveDistributedActor_actorTransport(
100
97
101
98
VarDecl *propDecl;
102
99
PatternBindingDecl *pbDecl;
103
- std::tie (propDecl, pbDecl) = createStoredProperty (
104
- decl, C,
105
- VarDecl::Introducer::Let, C.Id_actorTransport ,
100
+ std::tie (propDecl, pbDecl) = derived.declareDerivedProperty (
101
+ C.Id_actorTransport ,
106
102
propertyType, propertyType,
107
103
/* isStatic=*/ false , /* isFinal=*/ true );
108
104
0 commit comments