File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
compiler/src/main/java/com/readdle/codegen
sample/src/main/java/com/readdle/swiftjava/sample Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -57,10 +57,17 @@ class SwiftFuncDescriptor implements JavaSwiftProcessor.WritableElement {
5757 this .swiftMethodName = funcFullName .substring (0 , paramStart );
5858
5959 String arguments = funcFullName .substring (paramStart + 1 , paramEnd );
60- String [] paramNames = arguments .split (":" );
60+
61+ String [] paramNames ;
62+ if (!arguments .isEmpty ()) {
63+ paramNames = arguments .split (":" );
64+ }
65+ else {
66+ paramNames = new String [0 ];
67+ }
6168
6269 if (paramNames .length != params .size ()) {
63- throw new SwiftMappingException ("Wrong count of arguments in func name" , executableElement );
70+ throw new SwiftMappingException ("Wrong count of arguments in func name " + paramNames . length + " != " + params . size () , executableElement );
6471 }
6572
6673 for (String paramName : paramNames ) {
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ public interface CompletionBlock {
122122 @ NonNull
123123 public native List <AbstractType > getAbstractTypeList ();
124124
125- @ NonNull
125+ @ SwiftFunc ( "getAbstractType()" ) @ NonNull
126126 public native AbstractType getAbstractType ();
127127
128128 @ NonNull
You can’t perform that action at this time.
0 commit comments