File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -646,7 +646,7 @@ let arr = [BottleLayout]()
646
646
let layout = BottleLayout ( count: 1 )
647
647
let ix = arr. firstIndex ( of: layout) // expected-error {{argument type 'BottleLayout' does not conform to expected type 'Equatable'}}
648
648
649
- let _: ( ) -> UInt8 = { . init( " a " as Unicode . Scalar ) } // expected-error {{missing argument label 'ascii:' in call }}
649
+ let _: ( ) -> UInt8 = { . init( " a " as Unicode . Scalar ) } // expected-error {{initializer 'init(_:)' requires that 'Unicode.Scalar' conform to 'BinaryInteger' }}
650
650
651
651
// https://bugs.swift.org/browse/SR-9068
652
652
func compare< C: Collection , Key: Hashable , Value: Equatable > ( c: C )
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{{coalesce using '??' to provide a default when the optional value contains 'nil'}}
296
+ // expected-note@-2{{force-unwrap using '!' to abort execution if 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