File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ swift::getAssociatedDistributedInvocationDecoderDecodeNextArgumentFunction(
256256 return nullptr ;
257257
258258 auto systemTy = getConcreteReplacementForProtocolActorSystemType (thunk);
259- if (!systemTy)
259+ if (!systemTy || systemTy-> is <GenericTypeParamType>() )
260260 return nullptr ;
261261
262262 auto decoderTy =
Original file line number Diff line number Diff line change @@ -275,14 +275,15 @@ void SILFunctionBuilder::addFunctionAttributes(
275275 F->setDynamicallyReplacedFunction (replacedFunc);
276276 }
277277 } else if (constant.isDistributedThunk ()) {
278- auto decodeFuncDecl =
278+ // It's okay for `decodeFuncDecl` to be null because system could be
279+ // generic.
280+ if (auto decodeFuncDecl =
279281 getAssociatedDistributedInvocationDecoderDecodeNextArgumentFunction (
280- decl);
281- assert (decodeFuncDecl && " decodeNextArgument function not found!" );
282-
283- auto decodeRef = SILDeclRef (decodeFuncDecl);
284- auto *adHocFunc = getOrCreateDeclaration (decodeFuncDecl, decodeRef);
285- F->setReferencedAdHocRequirementWitnessFunction (adHocFunc);
282+ decl)) {
283+ auto decodeRef = SILDeclRef (decodeFuncDecl);
284+ auto *adHocFunc = getOrCreateDeclaration (decodeFuncDecl, decodeRef);
285+ F->setReferencedAdHocRequirementWitnessFunction (adHocFunc);
286+ }
286287 }
287288}
288289
You can’t perform that action at this time.
0 commit comments