Skip to content

Commit 48908aa

Browse files
committed
Use explicit paths for function arguments in Java
When we have an enum with a variant named the same as a struct we need to specify a full concrete path when referring to it. The simplest approach is to just use full concrete paths for all function arguments, which we do here.
1 parent 1ed7566 commit 48908aa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

java_strings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,10 @@ def map_function(self, argument_types, c_call_string, method_name, return_type_i
11731173
else:
11741174
if arg.nullable:
11751175
out_java_struct += "@Nullable "
1176-
out_java_struct += (arg.java_hu_ty + " " + arg.arg_name)
1176+
ty_string = arg.java_hu_ty
1177+
if arg.java_fn_ty_arg[0] == "L" and arg.java_fn_ty_arg[len(arg.java_fn_ty_arg) - 1] == ";":
1178+
ty_string = arg.java_fn_ty_arg.strip("L;").replace("/", ".")
1179+
out_java_struct += ty_string + " " + arg.arg_name
11771180
out_java += (");\n")
11781181
out_c += (") {\n")
11791182
if out_java_struct is not None:

0 commit comments

Comments
 (0)