mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Factor AbstractionPattern::conformsToKnownProtocol and lower ~Escapable using the same logic as ~Copyable.
Adds support for conditionally Escapable enums.
Correctly sets the SILType::isTrivial flags for conditionally escapable structs and enums in environments (extensions)
that provide an Escapable conformance, such as:
struct NE<E: ~Escapable> : ~Escapable {}
extension NE: Escapable {
func foo() -> Self {
// Self is both Escapable and trivial here.
self
}
}
Fixes rdar://125950218 ([nonescapable] support conditionally escapable enums)
64 KiB
64 KiB