Skip to content

Commit b3a3d01

Browse files
committed
Add diagnostics for newly missing types in Foundation.
1 parent 57c012c commit b3a3d01

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

Foundation/NSObjCRuntime.swift

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,3 +431,77 @@ public func NSClassFromString(_ aClassName: String) -> AnyClass? {
431431

432432
return _typeByName(aClassNameWithPrefix) as? AnyClass
433433
}
434+
435+
// The following types have been moved to FoundationNetworking. They exist here only to allow appropriate diagnostics to surface in the compiler.
436+
437+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
438+
renamed: "FoundationNetworking.CachedURLResponse")
439+
public typealias CachedURLResponse = AnyObject
440+
441+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
442+
renamed: "FoundationNetworking.HTTPCookie")
443+
public typealias HTTPCookie = AnyObject
444+
445+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
446+
renamed: "FoundationNetworking.HTTPCookieStorage")
447+
public typealias HTTPCookieStorage = AnyObject
448+
449+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
450+
renamed: "FoundationNetworking.HTTPURLResponse")
451+
public typealias HTTPURLResponse = AnyObject
452+
453+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
454+
renamed: "FoundationNetworking.URLResponse")
455+
public typealias URLResponse = AnyObject
456+
457+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
458+
renamed: "FoundationNetworking.URLSession")
459+
public typealias URLSession = AnyObject
460+
461+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
462+
renamed: "FoundationNetworking.URLSessionConfiguration")
463+
public typealias URLSessionConfiguration = AnyObject
464+
465+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
466+
renamed: "FoundationNetworking.URLSessionDataTask")
467+
public typealias URLSessionDataTask = AnyObject
468+
469+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
470+
renamed: "FoundationNetworking.URLSessionDownloadTask")
471+
public typealias URLSessionDownloadTask = AnyObject
472+
473+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
474+
renamed: "FoundationNetworking.URLSessionStreamTask")
475+
public typealias URLSessionStreamTask = AnyObject
476+
477+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
478+
renamed: "FoundationNetworking.URLSessionTask")
479+
public typealias URLSessionTask = AnyObject
480+
481+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
482+
renamed: "FoundationNetworking.URLSessionUploadTask")
483+
public typealias URLSessionUploadTask = AnyObject
484+
485+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
486+
renamed: "FoundationNetworking.URLAuthenticationChallenge")
487+
public typealias URLAuthenticationChallenge = AnyObject
488+
489+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
490+
renamed: "FoundationNetworking.URLCache")
491+
public typealias URLCache = AnyObject
492+
493+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
494+
renamed: "FoundationNetworking.URLCredential")
495+
public typealias URLCredential = AnyObject
496+
497+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
498+
renamed: "FoundationNetworking.URLCredentialStorage")
499+
public typealias URLCredentialStorage = AnyObject
500+
501+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
502+
renamed: "FoundationNetworking.URLProtectionSpace")
503+
public typealias URLProtectionSpace = AnyObject
504+
505+
@available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.",
506+
renamed: "FoundationNetworking.URLProtocol")
507+
public typealias URLProtocol = AnyObject

0 commit comments

Comments
 (0)