swift icon indicating copy to clipboard operation
swift copied to clipboard

[stdlib] Optional: Allow non-escapable wrapped types

Open lorentey opened this issue 9 months ago • 10 comments

This quick experimental PR generalizes Optional to support non-escapable payloads, itself becoming conditionally escapable.

rdar://125927256

lorentey avatar Apr 25 '24 17:04 lorentey

@swift-ci test

lorentey avatar Apr 25 '24 17:04 lorentey

Can we get the ExpressibleByNilLiteral and init(_ wrapped: consuming Wrapped) initializer supported?

Azoy avatar Apr 26 '24 20:04 Azoy

For ExpressibleByNilLiteral, I believe we still need to figure out how to express indefinite lifetime for the result of the init(nilLiteral:) initializer.

lorentey avatar Apr 26 '24 20:04 lorentey

@swift-ci test

lorentey avatar May 03 '24 00:05 lorentey

@swift-ci test

lorentey avatar May 29 '24 21:05 lorentey

@swift-ci test

lorentey avatar Jul 25 '24 02:07 lorentey

@swift-ci build toolchain

lorentey avatar Jul 25 '24 02:07 lorentey

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.

lorentey avatar Jul 25 '24 02:07 lorentey

@swift-ci test

lorentey avatar Jul 25 '24 20:07 lorentey

@swift-ci build toolchain

lorentey avatar Jul 25 '24 20:07 lorentey

@swift-ci test

lorentey avatar Jul 30 '24 21:07 lorentey

@swift-ci build toolchain

lorentey avatar Jul 30 '24 21:07 lorentey

@swift-ci test

lorentey avatar Aug 05 '24 21:08 lorentey

@swift-ci build toolchain

lorentey avatar Aug 05 '24 21:08 lorentey

@swift-ci build toolchain

lorentey avatar Aug 12 '24 22:08 lorentey

@swift-ci please build toolchain

glessard avatar Aug 18 '24 12:08 glessard

@swift-ci smoke test

glessard avatar Aug 18 '24 12:08 glessard

@swift-ci test

lorentey avatar Sep 19 '24 23:09 lorentey

@swift-ci build toolchain

lorentey avatar Sep 19 '24 23:09 lorentey