File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
struct SomeOptions : OptionSet {
4
4
var rawValue : Int
5
+
6
+ let someVal = MyOptions ( rawValue: 6 )
5
7
static let some = MyOptions ( rawValue: 4 )
6
- let empty = SomeOptions ( rawValue: 0 )
7
- var otherVal = SomeOptions ( rawValue: 0 )
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 )
8
10
}
9
11
10
12
struct MyOptions : OptionSet {
11
- init ( ) {
12
- rawValue = 0
13
- }
14
- var rawValue : Int
13
+ let rawValue : Int
14
+
15
15
static let none = MyOptions ( rawValue: 0 ) // expected-warning {{static property 'none' produces an empty option set}} expected-note {{use [] to silence this warning}}{{32-45=([])}}
16
16
static var nothing = MyOptions ( rawValue: 0 )
17
17
static let nope = MyOptions ( )
You can’t perform that action at this time.
0 commit comments