mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SE-0470] Prohibit isolated conformances in dynamic casts marked as such
Certain dynamic casts cannot work safely with isolated conformances, regardless of what executor the code runs on. For such cases, reject all attempts to conform to the type.
This commit is contained in:
@@ -28,6 +28,7 @@ namespace swift {
|
||||
class SILType;
|
||||
class ProtocolDecl;
|
||||
enum class CastConsumptionKind : unsigned char;
|
||||
enum class CastingIsolatedConformances: uint8_t;
|
||||
|
||||
namespace irgen {
|
||||
class Address;
|
||||
@@ -46,7 +47,8 @@ namespace irgen {
|
||||
Address dest,
|
||||
CanType toType,
|
||||
CastConsumptionKind consumptionKind,
|
||||
CheckedCastMode mode);
|
||||
CheckedCastMode mode,
|
||||
CastingIsolatedConformances isolatedConformances);
|
||||
|
||||
void emitScalarCheckedCast(IRGenFunction &IGF, Explosion &value,
|
||||
SILType sourceLoweredType,
|
||||
@@ -54,6 +56,7 @@ namespace irgen {
|
||||
SILType targetLoweredType,
|
||||
CanType targetFormalType,
|
||||
CheckedCastMode mode,
|
||||
CastingIsolatedConformances isolatedConformances,
|
||||
Explosion &out);
|
||||
|
||||
llvm::Value *emitFastClassCastIfPossible(
|
||||
|
||||
Reference in New Issue
Block a user