mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Harden diagnoseForcedCastExpr for lack of cast-to type
This commit is contained in:
@@ -335,7 +335,8 @@ deriveBodyDistributed_invokeHandlerOnReturn(AbstractFunctionDecl *afd,
|
||||
// If the SerializationRequirement requires it, we need to emit a cast:
|
||||
// metatype as! <<concrete SerializationRequirement.Type>>
|
||||
bool serializationRequirementIsAny =
|
||||
metatypeParam->getInterfaceType()->getMetatypeInstanceType()->isAny();
|
||||
serializationRequirementMetaTypeTy->getMetatypeInstanceType()->isEqual(
|
||||
C.getAnyExistentialType());
|
||||
|
||||
auto metatypeRef =
|
||||
new (C) DeclRefExpr(ConcreteDeclRef(metatypeParam), dloc, implicit);
|
||||
|
||||
Reference in New Issue
Block a user