File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
test/Interop/ObjC/swiftify-import Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -9159,6 +9159,8 @@ void ClangImporter::Implementation::swiftify(FuncDecl *MappedDecl) {
9159
9159
returnHasLifetimeInfo = true ;
9160
9160
}
9161
9161
for (auto [index, clangParam] : llvm::enumerate (ClangDecl->parameters ())) {
9162
+ if (index >= MappedDecl->getParameters ()->size ())
9163
+ break ;
9162
9164
auto clangParamTy = clangParam->getType ();
9163
9165
auto swiftParam = MappedDecl->getParameters ()->get (index);
9164
9166
bool paramHasBoundsInfo = false ;
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
+ //--- Inputs/module.modulemap
11
+ module Method {
12
+ header " method.h "
13
+ }
14
+
15
+ //--- Inputs/method.h
16
+
17
+ @interface Image
18
+
19
+ @property int width;
20
+
21
+ @end
22
+
23
+ //--- method.swift
24
+ import Method
25
+
26
+ func test( _ image: Image ) -> Int32 {
27
+ return image. width
28
+ }
You can’t perform that action at this time.
0 commit comments