[Distributed] avoid double typechecking dist func decl

This commit is contained in:
Konrad `ktoso` Malawski
2022-03-29 09:02:43 +09:00
parent a5adc4c9be
commit 7332e4b3eb
2 changed files with 2 additions and 4 deletions

View File

@@ -699,8 +699,7 @@ FuncDecl *GetDistributedThunkRequest::evaluate(
// Force type-checking the original function, so we can avoid synthesizing
// the thunks (which would have many of the same errors, if they are caused
// by a bad source function signature, e.g. missing conformances etc).
(void) TypeChecker::typeCheckDecl(distributedTarget);
if (distributedTarget->getDiags().hadAnyError()) {
if (distributedTarget->getInterfaceType()->hasError()) {
return nullptr;
}