Skip to content

Commit 2269c80

Browse files
authored
Merge pull request #69530 from slavapestov/distributed-type-alias
Distributed: Remove unnecessary unwrapping of TypeAliasType
2 parents b72f0c9 + 5c4c65b commit 2269c80

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/AST/DistributedDecl.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,7 @@ Type swift::getDistributedActorSystemResultHandlerType(
178178
auto module = system->getParentModule();
179179
Type selfType = system->getSelfInterfaceType();
180180
auto conformance = module->lookupConformance(selfType, DAS);
181-
auto witness =
182-
conformance.getTypeWitnessByName(selfType, ctx.Id_ResultHandler);
183-
if (auto alias = dyn_cast<TypeAliasType>(witness.getPointer())) {
184-
return alias->getDecl()->getUnderlyingType();
185-
} else {
186-
return witness;
187-
}
181+
return conformance.getTypeWitnessByName(selfType, ctx.Id_ResultHandler);
188182
}
189183

190184
Type swift::getDistributedActorSystemInvocationEncoderType(NominalTypeDecl *system) {

0 commit comments

Comments
 (0)