mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Simplification: check for isolated conformances when simplifying metatype casts
rdar://147417762
This commit is contained in:
@@ -81,7 +81,9 @@ private extension UnconditionalCheckedCastInst {
|
||||
return
|
||||
}
|
||||
let conformance = sourceFormalType.instanceTypeOfMetatype.checkConformance(to: proto)
|
||||
guard conformance.isValid else {
|
||||
guard conformance.isValid,
|
||||
conformance.matchesActorIsolation(in: parentFunction)
|
||||
else {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user