From 2f575ffbf4a1f58122e7a13a10147429b6d3cead Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Fri, 24 Jul 2015 09:16:47 -0400 Subject: [PATCH] contrib/jwrapper: fix commenting out unknown types on `-u comment` only MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- contrib/jwrapper/src/code_generator.nit | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/jwrapper/src/code_generator.nit b/contrib/jwrapper/src/code_generator.nit index 16a7c01..5e3d770 100644 --- a/contrib/jwrapper/src/code_generator.nit +++ b/contrib/jwrapper/src/code_generator.nit @@ -151,7 +151,7 @@ class CodeGenerator var jparam = jparam_list[i] var nit_type = model.java_to_nit_type(jparam) - if not nit_type.is_known then comment = "#" + if not nit_type.is_known and comment_unknown_types then comment = "#" if jparam.is_primitive_array then comment = "#" var cast = jparam.param_cast @@ -187,7 +187,7 @@ class CodeGenerator if not jreturn_type.is_void then return_type = model.java_to_nit_type(jreturn_type) - if not return_type.is_known then comment = "#" + if not return_type.is_known and comment_unknown_types then comment = "#" if jreturn_type.is_primitive_array then comment = "#" nit_signature.add ": {return_type} " @@ -218,7 +218,7 @@ class CodeGenerator nit_id = java_class.nit_name_for(nit_id, [java_type], false) var c = "" - if not nit_type.is_known then c = "#" + if not nit_type.is_known and comment_unknown_types then c = "#" if java_type.is_primitive_array then c = "#" file_out.write """ @@ -254,7 +254,7 @@ class CodeGenerator nit_params.add "{param_id}: {nit_type}" param_id = param_id.successor(1) - if not nit_type.is_known then c = "#" + if not nit_type.is_known and comment_unknown_types then c = "#" if java_type.is_primitive_array then c = "#" end -- 1.7.9.5