We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67cd809 commit 9cc2d65Copy full SHA for 9cc2d65
test/Sema/option-set-empty.swift
@@ -3,11 +3,13 @@
3
struct SomeOptions: OptionSet {
4
var rawValue: Int
5
6
- let someVal = MyOptions(rawValue: 6)
7
static let some = MyOptions(rawValue: 4)
8
static let empty = SomeOptions(rawValue: 0) // expected-warning {{static property 'empty' produces an empty option set}} expected-note {{use [] to silence this warning}}{{35-48=([])}}
9
static var otherVal = SomeOptions(rawValue: 0)
+
10
+ let someVal = MyOptions(rawValue: 6)
11
let option = MyOptions(float: Float.infinity)
12
+ let none = MyOptions(rawValue: 0)
13
}
14
15
struct MyOptions: OptionSet {
0 commit comments