Skip to content

Commit 58ad17a

Browse files
committed
[Distributed] Preserve the order of the id and actor system properties
in evaluateMembersRequest.
1 parent d3c67ef commit 58ad17a

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
@@ -2842,7 +2842,14 @@ static ArrayRef<Decl *> evaluateMembersRequest(
28422842
if (auto *vd = dyn_cast<ValueDecl>(member)) {
28432843
// Add synthesized members to a side table and sort them by their mangled
28442844
// name, since they could have been added to the class in any order.
2845-
if (vd->isSynthesized()) {
2845+
if (vd->isSynthesized() &&
2846+
// FIXME: IRGen requires the distributed actor synthesized
2847+
// properties to be in a specific order that is different
2848+
// from ordering by their mangled name, so preserve the order
2849+
// they were added in.
2850+
!(nominal &&
2851+
(vd == nominal->getDistributedActorIDProperty() ||
2852+
vd == nominal->getDistributedActorSystemProperty()))) {
28462853
synthesizedMembers.add(vd);
28472854
return;
28482855
}

0 commit comments

Comments
 (0)