This repository was archived by the owner on Mar 20, 2020. It is now read-only.
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 {
57
57
this .swiftMethodName = funcFullName .substring (0 , paramStart );
58
58
59
59
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
+ }
61
68
62
69
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 );
64
71
}
65
72
66
73
for (String paramName : paramNames ) {
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ public interface CompletionBlock {
122
122
@ NonNull
123
123
public native List <AbstractType > getAbstractTypeList ();
124
124
125
- @ NonNull
125
+ @ SwiftFunc ( "getAbstractType()" ) @ NonNull
126
126
public native AbstractType getAbstractType ();
127
127
128
128
@ NonNull
You can’t perform that action at this time.
0 commit comments