Skip to content

Commit 3f96a20

Browse files
committed
add test for invalid enum raw value diagnosis
1 parent 47b61d4 commit 3f96a20

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/decl/enum/enumtest.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,5 +290,9 @@ func testSimpleEnum() {
290290
let _ : SimpleEnum=.X // expected-error {{'=' must have consistent whitespace on both sides}}
291291
}
292292

293+
enum SR510: String {
294+
case Thing = "thing"
295+
case Bob = {"test"} // expected-error {{not a proper raw value expression}}
296+
}
293297

294298

0 commit comments

Comments
 (0)