swift
swift copied to clipboard
[stdlib] Optional: Allow non-escapable wrapped types
This quick experimental PR generalizes Optional
to support non-escapable payloads, itself becoming conditionally escapable.
rdar://125927256
@swift-ci test
Can we get the ExpressibleByNilLiteral
and init(_ wrapped: consuming Wrapped)
initializer supported?
For ExpressibleByNilLiteral
, I believe we still need to figure out how to express indefinite lifetime for the result of the init(nilLiteral:)
initializer.
@swift-ci test
@swift-ci test
@swift-ci test
@swift-ci build toolchain
The last push added generalizations for MemoryLayout
, ExpressibleByNilLiteral
and unsafeBitCast
in addition to a somewhat working Optional
generalization.
I had to temporarily disable module verification and silence a bogus diagnostic to make this stuff work. Hopefully that'll go away soon.
@swift-ci test
@swift-ci build toolchain
@swift-ci test
@swift-ci build toolchain
@swift-ci test
@swift-ci build toolchain
@swift-ci build toolchain
@swift-ci please build toolchain
@swift-ci smoke test
@swift-ci test
@swift-ci build toolchain