@@ -615,19 +615,19 @@ class ClassAvailableOn10_9 {
615615}
616616
617617@available ( OSX, introduced: 10.51 )
618- class ClassAvailableOn10_51 { // expected-note {{enclosing scope here }}
618+ class ClassAvailableOn10_51 { // expected-note {{enclosing scope requires availability of macOS 10.51 or newer }}
619619 func someMethod( ) { }
620620 class func someClassMethod( ) {
621621 let _ = ClassAvailableOn10_51 ( )
622622 }
623623 var someProp : Int = 22
624624
625- @available ( OSX, introduced: 10.9 ) // expected-error {{declaration cannot be more available than enclosing scope}}
625+ @available ( OSX, introduced: 10.9 ) // expected-error {{instance method cannot be more available than enclosing scope}}
626626 func someMethodAvailableOn10_9( ) { }
627627
628628 @available ( OSX, introduced: 10.52 )
629- var propWithGetter : Int { // expected-note{{enclosing scope here }}
630- @available ( OSX, introduced: 10.51 ) // expected-error {{declaration cannot be more available than enclosing scope}}
629+ var propWithGetter : Int { // expected-note{{enclosing scope requires availability of macOS 10.52 or newer }}
630+ @available ( OSX, introduced: 10.51 ) // expected-error {{getter cannot be more available than enclosing scope}}
631631 get { return 0 }
632632 }
633633}
@@ -1022,8 +1022,8 @@ extension ClassToExtend : ProtocolAvailableOn10_51 {
10221022}
10231023
10241024@available ( OSX, introduced: 10.51 )
1025- extension ClassToExtend { // expected-note {{enclosing scope here }}
1026- @available ( OSX, introduced: 10.9 ) // expected-error {{declaration cannot be more available than enclosing scope}}
1025+ extension ClassToExtend { // expected-note {{enclosing scope requires availability of macOS 10.51 or newer }}
1026+ @available ( OSX, introduced: 10.9 ) // expected-error {{instance method cannot be more available than enclosing scope}}
10271027 func extensionMethod10_9( ) { }
10281028}
10291029
0 commit comments