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(
256
256
return nullptr ;
257
257
258
258
auto systemTy = getConcreteReplacementForProtocolActorSystemType (thunk);
259
- if (!systemTy)
259
+ if (!systemTy || systemTy-> is <GenericTypeParamType>() )
260
260
return nullptr ;
261
261
262
262
auto decoderTy =
Original file line number Diff line number Diff line change @@ -275,14 +275,15 @@ void SILFunctionBuilder::addFunctionAttributes(
275
275
F->setDynamicallyReplacedFunction (replacedFunc);
276
276
}
277
277
} 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 =
279
281
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
+ }
286
287
}
287
288
}
288
289
You can’t perform that action at this time.
0 commit comments