You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/Parse/enum.swift
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -127,8 +127,8 @@ enum Recovery5 {
127
127
enumRecovery6{
128
128
case Snout, _; // expected-error {{keyword '_' cannot be used as an identifier here}} expected-note {{if this name is unavoidable, use backticks to escape it}} {{15-16=`_`}}
129
129
case _; // expected-error {{keyword '_' cannot be used as an identifier here}} expected-note {{if this name is unavoidable, use backticks to escape it}} {{8-9=`_`}}
130
-
case Tusk, // expected-error {{expected pattern}}
131
-
}// expected-error {{expected identifier after comma in enum 'case' declaration}}
130
+
case Tusk, // expected-error {{expected identifier after comma in enum 'case' declaration}}
131
+
}
132
132
133
133
enumRawTypeEmpty:Int{} // expected-error {{an enum with no cases cannot declare a raw type}} expected-note {{do you want to add protocol stubs?}}
134
134
// expected-error@-1{{'RawTypeEmpty' declares raw type 'Int', but does not conform to RawRepresentable and conformance could not be synthesized}}
@@ -574,4 +574,8 @@ enum SR11261_Newline {
574
574
enumSR11261_Newline2{
575
575
case
576
576
func foo(){} // expected-error {{keyword 'func' cannot be used as an identifier here}} expected-note {{if this name is unavoidable, use backticks to escape it}} {{3-7=`func`}}
577
+
}
578
+
579
+
enum SR11261_PatternMatching {
580
+
case let .foo(x,y): // expected-error {{'case' label can only appear inside a 'switch' statement}}
0 commit comments