mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Update the compiler and SDK overlay for nullability and generics in Foundation
We have an SPI between the Swift compiler and Foundation based on the SWIFT_SDK_OVERLAY_FOUNDATION_EPOCH preprocessor macro that allows us to request the new API. rdar://20270080 tracks removing it. Swift SVN r26475
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
#import "ObjectiveC.h"
|
||||
|
||||
#pragma clang assume_nonnull begin
|
||||
|
||||
@interface NSString : NSObject<NSCopying>
|
||||
|
||||
- (NSString*)uppercaseString;
|
||||
- (__null_unspecified NSString*)uppercaseString;
|
||||
- (id) copyWithZone: (void*)zone;
|
||||
|
||||
@end
|
||||
@@ -24,8 +26,8 @@
|
||||
|
||||
@interface Foo : NSObject
|
||||
|
||||
- (NSString*) foo;
|
||||
- (void) setFoo: (NSString*)s;
|
||||
- (__null_unspecified NSString*) foo;
|
||||
- (void) setFoo: (__null_unspecified NSString*)s;
|
||||
|
||||
- (BOOL) zim;
|
||||
- (void) setZim: (BOOL)b;
|
||||
@@ -37,10 +39,10 @@
|
||||
|
||||
@end
|
||||
|
||||
NSString *bar(void);
|
||||
void setBar(NSString *s);
|
||||
__null_unspecified NSString *bar(void);
|
||||
void setBar(__null_unspecified NSString *s);
|
||||
|
||||
NSString *NSStringFromString(NSString *s);
|
||||
__null_unspecified NSString *NSStringFromString(__null_unspecified NSString *s);
|
||||
NSString *NSStringFromClass(Class c);
|
||||
|
||||
#define CF_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
|
||||
@@ -52,3 +54,6 @@ _Bool getBool(void);
|
||||
|
||||
void useBOOL(BOOL x);
|
||||
void useBool(_Bool x);
|
||||
|
||||
#pragma clang assume_nonnull end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user