File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -145,10 +145,19 @@ VarDecl *GetDistributedActorSystemPropertyRequest::evaluate(
145
145
if (!C.getLoadedModule (C.Id_Distributed ))
146
146
return nullptr ;
147
147
148
-
149
- if (auto system = actor->lookupDirect (C.Id_actorSystem ).begin ()) {
150
- // TODO(distributed): may need to check conformance here?
151
- return dyn_cast<VarDecl>(*system);
148
+ auto module = C.getStdlibModule ();
149
+ auto DistSystemProtocol =
150
+ C.getProtocol (KnownProtocolKind::DistributedActorSystem);
151
+
152
+ for (auto system : actor->lookupDirect (C.Id_actorSystem )) {
153
+ if (auto var = dyn_cast<VarDecl>(system)) {
154
+ auto conformance = module ->conformsToProtocol (var->getInterfaceType (),
155
+ DistSystemProtocol);
156
+ if (conformance.isInvalid ())
157
+ continue ;
158
+
159
+ return var;
160
+ }
152
161
}
153
162
154
163
return nullptr ;
You can’t perform that action at this time.
0 commit comments