Skip to content

Commit 29d29c1

Browse files
committed
Add Interpreter test for @_objcImpl
1 parent ab75459 commit 29d29c1

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#import <Foundation/Foundation.h>
2+
3+
@interface ImplClass : NSObject
4+
5+
- (nonnull NSString *)someMethod;
6+
7+
@end
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// RUN: %target-run-simple-swift(-import-objc-header %S/Inputs/objc_implementation.h) %s | %FileCheck %s
2+
// REQUIRES: executable_test
3+
// REQUIRES: objc_interop
4+
5+
import Foundation
6+
7+
@_objcImplementation extension ImplClass {
8+
@objc func someMethod() -> String { "ImplClass.someMethod()" }
9+
}
10+
11+
print(ImplClass().someMethod())
12+
// CHECK: ImplClass.someMethod()

0 commit comments

Comments
 (0)