Support Xcode 13 beta

* Updating availability versions
* Remove all remaining overlays in stdlib/public/Darwin/*:
   - ObjectiveC
   - Dispatch
   - CoreFoundation
   - CoreGraphics
   - Foundation
This commit is contained in:
Mishal Shah
2021-06-07 12:04:31 -07:00
parent 9b963b7c46
commit 23c3b15f5f
176 changed files with 234 additions and 46704 deletions

View File

@@ -105,7 +105,7 @@ CastTrapsTestSuite.test("${t1}__${t2}")
% end
protocol P2 {}
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
if #available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) {
CastTrapsTestSuite.test("Unexpected null")
.crashOutputMatches("Found unexpected null pointer value while trying to cast value of type '")
.crashOutputMatches("Foo'")
@@ -125,7 +125,7 @@ CastTrapsTestSuite.test("Unexpected null")
#if _runtime(_ObjC)
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
if #available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) {
CastTrapsTestSuite.test("Unexpected Obj-C null")
.crashOutputMatches("Found unexpected null pointer value while trying to cast value of type '")
.crashOutputMatches("NSObject'")

View File

@@ -167,7 +167,7 @@ CastsTests.test("Dynamic casts of CF types to protocol existentials (SR-2289)")
reason: "This test behaves unpredictably in optimized mode."))
.code {
expectTrue(isP(10 as Int))
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
if #available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) {
expectTrue(isP(CFBitVector.makeImmutable(from: [10, 20])))
expectTrue(isP(CFMutableBitVector.makeMutable(from: [10, 20])))
}
@@ -195,7 +195,7 @@ CastsTests.test("Casting struct -> Obj-C -> Protocol fails (SR-3871, SR-5590, SR
protocol P4552 {}
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
if #available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) {
CastsTests.test("Casting Any(Optional(T)) -> Protocol fails (SR-4552)") {
struct S: P4552 {
let tracker = LifetimeTracked(13)
@@ -257,7 +257,7 @@ CastsTests.test("Store Swift metatype in ObjC property and cast back to Any.Type
let sValue2 = a.sVar as? Any.Type
let objcValue2 = a.objcVar as? Any.Type
expectTrue(sValue2 == b)
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
if #available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) {
expectTrue(sValue2 == objcValue2)
expectTrue(objcValue2 == b)
}
@@ -303,7 +303,7 @@ CastsTests.test("Casts from @objc Type") {
let user = User(name: "Kermit")
let exporter: Exporter = UserExporter()
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
if #available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) {
expectTrue(exporter.type is User.Type)
}
expectNotNil(exporter.export(item: user))
@@ -319,7 +319,7 @@ CastsTests.test("Conditional NSNumber -> Bool casts") {
#endif
// rdar://45217461 ([dynamic casting] [SR-8964]: Type check operator (is) fails for Any! variable holding an Error (struct) value)
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
if #available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) {
CastsTests.test("Casts from Any(struct) to Error (SR-8964)") {
struct MyError: Error { }
@@ -393,7 +393,7 @@ CastsTests.test("Swift Protocol Metatypes don't self-conform") {
let a = SwiftProtocol.self
// `is P.Protocol` tests whether the argument is a subtype of P.
// In particular, the protocol identifier `P.self` is such a subtype.
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
if #available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) {
expectNotNil(runtimeCast(a, to: SwiftProtocol.Protocol.self)) // Fixed by rdar://58991956
}
expectNotNil(a as? SwiftProtocol.Protocol)
@@ -446,7 +446,7 @@ CastsTests.test("Self-conformance for Error.self")
@objc protocol ObjCProtocol {}
CastsTests.test("ObjC Protocol Metatypes self-conform") {
let a = ObjCProtocol.self
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
if #available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) {
expectNotNil(runtimeCast(a, to: ObjCProtocol.Protocol.self))
}
expectNotNil(a as? ObjCProtocol.Protocol)
@@ -472,7 +472,7 @@ CastsTests.test("String/NSString extension compat") {
#endif
protocol P1999 {}
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
if #available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) {
CastsTests.test("Cast Any(Optional(class)) to Protocol type (SR-1999)") {
class Foo: P1999 { }