contrib/jwrapper: skip all vararg types in code generation
authorAlexis Laferrière <alexis.laf@xymus.net>
Wed, 29 Jul 2015 09:40:28 +0000 (05:40 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 29 Jul 2015 19:08:58 +0000 (15:08 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

contrib/jwrapper/src/code_generator.nit

index aeae678..75fc5e8 100644 (file)
@@ -174,6 +174,7 @@ class CodeGenerator
                        var nit_type = model.java_to_nit_type(jparam)
 
                        if not nit_type.is_known and comment_unknown_types then c = "#"
+                       if jparam.is_vararg then c = "#"
 
                        java_args.add "{jparam.param_cast}{nit_id}{nit_id_no}"
                        nit_params.add "{nit_id}{nit_id_no}: {nit_type}"
@@ -196,6 +197,7 @@ class CodeGenerator
                        return_type = model.java_to_nit_type(java_return_type)
 
                        if not return_type.is_known and comment_unknown_types then c = "#"
+                       if java_return_type.is_vararg then c = "#"
 
                        nit_signature.add ": " + return_type.to_s
                end
@@ -237,6 +239,7 @@ class CodeGenerator
 
                var c = ""
                if not nit_type.is_known and comment_unknown_types then c = "#"
+               if java_type.is_vararg then c = "#"
 
                var recv
                if attribute.is_static then
@@ -282,6 +285,7 @@ class CodeGenerator
                                param_id = param_id.successor(1)
 
                                if not nit_type.is_known and comment_unknown_types then c = "#"
+                               if java_type.is_vararg then c = "#"
                        end
 
                        nit_params_s = "(" + nit_params.join(", ") + ")"