Ver Fonte

[java/cs] Prepare the code for the abstract null type PR

Cauê Waneck há 8 anos atrás
pai
commit
4bb831b89c
2 ficheiros alterados com 3 adições e 1 exclusões
  1. 2 1
      src/generators/gencs.ml
  2. 1 0
      src/generators/genjava.ml

+ 2 - 1
src/generators/gencs.ml

@@ -2994,7 +2994,8 @@ let generate con =
 		in
 		in
 
 
 		let nullable_basic t = match gen.gfollow#run_f t with
 		let nullable_basic t = match gen.gfollow#run_f t with
-			| TType({ t_path = ([],"Null") }, [t]) when is_cs_basic_type t ->
+			| TType({ t_path = ([],"Null") }, [t])
+			| TAbstract({ a_path = ([],"Null") }, [t]) when is_cs_basic_type t ->
 				Some(t)
 				Some(t)
 			| _ ->
 			| _ ->
 				None
 				None

+ 1 - 0
src/generators/genjava.ml

@@ -2476,6 +2476,7 @@ let generate con =
 	let is_int t = like_int t in
 	let is_int t = like_int t in
 
 
 	let nullable_basic t = match gen.gfollow#run_f t with
 	let nullable_basic t = match gen.gfollow#run_f t with
+		| TAbstract({ a_path = ([],"Null") }, [t])
 		| TType({ t_path = ([],"Null") }, [t]) when is_java_basic_type t ->
 		| TType({ t_path = ([],"Null") }, [t]) when is_java_basic_type t ->
 			Some(t)
 			Some(t)
 		| _ ->
 		| _ ->