Skip to content

Commit 483b8da

Browse files
committed
Tests: Add a test case to attr_availability_maccatalyst_implicit.swift.
rdar://107764128
1 parent fe3c1e8 commit 483b8da

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -I %t -I %S/Inputs/custom-modules -parse-stdlib -parse-as-library -typecheck -verify -target x86_64-apple-ios15.4-macabi %s
1+
// RUN: %target-swift-frontend -I %t -I %S/Inputs/custom-modules -parse-stdlib -parse-as-library -typecheck -verify -target %target-cpu-apple-ios15.4-macabi %s
22

33
// REQUIRES: objc_interop
44
// REQUIRES: maccatalyst_support
@@ -7,7 +7,17 @@ import Available_NSObject
77

88
@available(iOS 15.0, *)
99
open class OverAvailableClass: NSBaseClass {}
10-
// expected-error@-1 {{initializer cannot be more available than enclosing scope}}
10+
// expected-warning@-1 {{initializer cannot be more available than enclosing scope}}
1111
// expected-note@-2 {{initializer implicitly declared here with availability of Mac Catalyst 13.1 or newer}}
1212
// expected-note@-3 {{enclosing scope requires availability of Mac Catalyst 15.0 or newer}}
1313

14+
extension NSBaseClass {
15+
@available(iOS 15.0, *)
16+
// expected-warning@+3 {{_modify accessor cannot be more available than enclosing scope}}
17+
// expected-note@+2 {{_modify accessor implicitly declared here with availability of Mac Catalyst 13.1 or newer}}
18+
// expected-note@+1 {{enclosing scope requires availability of Mac Catalyst 15.0 or newer}}
19+
var property: Int {
20+
get { 1 }
21+
set {}
22+
}
23+
}

0 commit comments

Comments
 (0)