Skip to content

Commit 37e18e5

Browse files
committed
[Distributed] Preserve the order of the id and actor system properties
in evaluateMembersRequest. (cherry picked from commit 58ad17a)
1 parent cc086b1 commit 37e18e5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2855,7 +2855,14 @@ static ArrayRef<Decl *> evaluateMembersRequest(
28552855
if (auto *vd = dyn_cast<ValueDecl>(member)) {
28562856
// Add synthesized members to a side table and sort them by their mangled
28572857
// name, since they could have been added to the class in any order.
2858-
if (vd->isSynthesized()) {
2858+
if (vd->isSynthesized() &&
2859+
// FIXME: IRGen requires the distributed actor synthesized
2860+
// properties to be in a specific order that is different
2861+
// from ordering by their mangled name, so preserve the order
2862+
// they were added in.
2863+
!(nominal &&
2864+
(vd == nominal->getDistributedActorIDProperty() ||
2865+
vd == nominal->getDistributedActorSystemProperty()))) {
28592866
synthesizedMembers.add(vd);
28602867
return;
28612868
}

0 commit comments

Comments
 (0)