File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
test/Interop/ObjC/swiftify-import Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ // REQUIRES: swift_feature_SafeInteropWrappers
2
+
3
+ // RUN: rm -rf %t
4
+ // RUN: split-file %s %t
5
+ // RUN: %target-swift-ide-test -plugin-path %swift-plugin-dir -I %t/Inputs -enable-experimental-feature SafeInteropWrappers -print-module -module-to-print=Method -source-filename=x | %FileCheck %s
6
+ // RUN: %target-swift-frontend -plugin-path %swift-plugin-dir -I %t/Inputs -enable-experimental-feature SafeInteropWrappers %t/method.swift -dump-macro-expansions -typecheck -verify
7
+
8
+ // REQUIRES: objc_interop
9
+
10
+ // CHECK: class Foo {
11
+ // CHECK: func bar(_ p: UnsafeMutableBufferPointer<Float>)
12
+
13
+ //--- Inputs/module.modulemap
14
+ module Method {
15
+ header " method.h "
16
+ }
17
+
18
+ //--- Inputs/method.h
19
+
20
+ @interface Foo
21
+ - ( void) bar: ( float * ) p count: ( int) len __attribute__( ( swift_attr ( " @_SwiftifyImport(.countedBy(pointer: .param(1), count: \" len \" )) " ) ) ) ;
22
+ @end
23
+
24
+ //--- method.swift
25
+ import Method
26
+
27
+ func test( foo: Foo , s: UnsafeMutableBufferPointer < Float > ) {
28
+ foo. bar ( s)
29
+ }
You can’t perform that action at this time.
0 commit comments