File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -291,7 +291,9 @@ switch staticMembers {
291
291
case . init( 0 ) : break
292
292
case . init( _) : break // expected-error{{'_' can only appear in a pattern}}
293
293
case . init( let x) : break // expected-error{{cannot appear in an expression}}
294
- case . init( opt: 0 ) : break // expected-error{{pattern cannot match values of type 'StaticMembers'}}
294
+ case . init( opt: 0 ) : break // expected-error{{value of optional type 'StaticMembers?' must be unwrapped to a value of type 'StaticMembers'}}
295
+ // expected-note@-1 {{force-unwrap using '!' to abort execution if the optional value contains 'nil'}}
296
+ // expected-note@-2 {{coalesce using '??' to provide a default when the optional value contains 'nil'}}
295
297
296
298
case . prop: break
297
299
// TODO: repeated error message
You can’t perform that action at this time.
0 commit comments