Files
swift-mirror/test/PrintAsObjC/Inputs/custom-modules/VersionedFMWK.h
Jordan Rose bd0cb3de8a [PrintAsObjC] Silence -Wnullability for the generated declarations. (#10247)
Since Swift 3 and Swift 4 might have different views of an Objective-C
API's nullability, we can end up with incompatible overrides,
including with inherited initializers. This is unfortunate but also
realistic; the Swift 3 code is /not/ set up to handle the new nullability
used by Swift 4 and Objective-C. Just silence the warning.

(It would be nice to not print inherited initializers at all, but that
would mean making sure there are no convenience initializers we have
to print as well. Otherwise the class would get mistaken for one
without explicit designated initializers.)

rdar://problem/32571301
2017-06-14 13:50:06 -07:00

27 lines
718 B
Objective-C

// This file is meant to be included with modules turned off, compiled against
// the fake clang-importer-sdk.
#import <Foundation.h>
@interface Outer : NSObject
@end
__attribute__((swift_name("Outer.Inner")))
@interface InnerClass : NSObject
@end
struct __attribute__((swift_name("Outer.InnerV"))) InnerStruct {
int value;
};
typedef struct {
int value;
} InnerAnonStruct __attribute__((swift_name("Outer.InnerAS")));
typedef int InnerAlias __attribute__((swift_name("Outer.InnerA")));
@interface NullabilityBase : NSObject
- (nonnull instancetype)initFormerlyFailableValue:(NSInteger)value __attribute__((objc_designated_initializer));
- (void)processNowNullableArgument:(nullable NSObject *)object;
@end