Skip to content

Commit 5c4c65b

Browse files
committed
Distributed: Remove unnecessary unwrapping of TypeAliasType
1 parent a345e57 commit 5c4c65b

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)