mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This is pretty much a simplification of the existing RawOptionSetType logic; now, instead of generating a bunch of implicit decls, we provide the minimum set of declarations from which the stdlib will be able to generate default implementations of everything else. The new imported declaration looks like this:
struct MyOptions: OptionSetType {
let rawValue: UInt // or whatever raw type
init(rawValue: UInt)
static var A: MyOptions { return MyOptions(rawValue: 1) }
static var B: MyOptions { return MyOptions(rawValue: 2) }
/* etc. */
}
Still hidden behind a staging flag, until the stdlib implementation can land.
Swift SVN r28213
227 KiB
227 KiB