[K/N] Implement objc export header test: functionWithErrorType
This commit is contained in:
committed by
Space Team
parent
04df33eec1
commit
977d1c0e41
+5
@@ -102,4 +102,9 @@ class Fe10ObjCExportHeaderGeneratorTest : AbstractFE10ObjCExportHeaderGeneratorT
|
||||
fun `test - functionWithThrowsAnnotation`() {
|
||||
doTest(objCExportTestDataDir.resolve("functionWithThrowsAnnotation"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test - functionWithErrorType`() {
|
||||
doTest(objCExportTestDataDir.resolve("functionWithErrorType"))
|
||||
}
|
||||
}
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSError.h>
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSSet.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
@class ERROR;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunknown-warning-option"
|
||||
#pragma clang diagnostic ignored "-Wincompatible-property-type"
|
||||
#pragma clang diagnostic ignored "-Wnullability"
|
||||
|
||||
#pragma push_macro("_Nullable_result")
|
||||
#if !__has_feature(nullability_nullable_result)
|
||||
#undef _Nullable_result
|
||||
#define _Nullable_result _Nullable
|
||||
#endif
|
||||
|
||||
__attribute__((objc_subclassing_restricted))
|
||||
@interface FooKt : Base
|
||||
+ (ERROR *)foo __attribute__((swift_name("foo()")));
|
||||
@end
|
||||
|
||||
@interface ERROR : Base
|
||||
@end
|
||||
|
||||
#pragma pop_macro("_Nullable_result")
|
||||
#pragma clang diagnostic pop
|
||||
NS_ASSUME_NONNULL_END
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
fun foo() = Unresolved
|
||||
Reference in New Issue
Block a user