We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 859110c commit 2140dc2Copy full SHA for 2140dc2
lib/AST/Type.cpp
@@ -379,10 +379,12 @@ bool TypeBase::isActorType() {
379
if (!actorProto)
380
return false;
381
382
- auto interfaceType = archetype->getInterfaceType();
383
- auto genericEnv = archetype->getGenericEnvironment();
384
- return genericEnv->getGenericSignature()->requiresProtocol(
385
- interfaceType, actorProto);
+ for (auto proto : archetype->getConformsTo()) {
+ if (proto == actorProto || proto->inheritsFrom(actorProto))
+ return true;
+ }
386
+
387
+ return false;
388
}
389
390
// Existential types: check for Actor protocol.
0 commit comments