Skip to content

Commit 1da9215

Browse files
committed
Revert "Revert "fix tests""
This reverts commit b7e059d.
1 parent b276a7e commit 1da9215

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/Sema/option-set-empty.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
struct SomeOptions: OptionSet {
44
var rawValue: Int
5+
6+
let someVal = MyOptions(rawValue: 6)
57
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)
810
}
911

1012
struct MyOptions: OptionSet {
11-
init() {
12-
rawValue = 0
13-
}
14-
var rawValue: Int
13+
let rawValue: Int
14+
1515
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=([])}}
1616
static var nothing = MyOptions(rawValue: 0)
1717
static let nope = MyOptions()

0 commit comments

Comments
 (0)