@@ -217,9 +217,6 @@ module DUG = struct
217217
218218 and count_param = function Arg a -> List. length a | Param p -> List. length p
219219
220- let modify_import import v =
221- { import; variable = v.variable; field = v.field; summary = v.summary }
222-
223220 let is_array_init f = Utils. is_array_init (get_func f).method_name
224221
225222 let is_array_set f = Utils. is_array_set (get_func f).method_name
@@ -800,6 +797,22 @@ module DUG = struct
800797
801798 and is_cn = function ClassName _ -> true | _ -> false
802799
800+ let array_var_code typ v =
801+ match get_array_typ typ with
802+ | Int -> " int" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
803+ | Long -> " long" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
804+ | Short -> " short" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
805+ | Byte -> " byte" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
806+ | Float -> " float" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
807+ | Double -> " double" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
808+ | Char -> " char" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
809+ | String -> " String" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
810+ | Object name ->
811+ (get_short_class_name name |> Utils. replace_nested_symbol)
812+ ^ array_code (get_array_dim typ) " "
813+ ^ " " ^ snd v
814+ | _ -> " "
815+
803816 let var_code v =
804817 let v =
805818 match v.variable with
@@ -819,21 +832,7 @@ module DUG = struct
819832 | String -> " String " ^ snd v
820833 | Object name ->
821834 (get_short_class_name name |> Utils. replace_nested_symbol) ^ " " ^ snd v
822- | Array typ -> (
823- match get_array_typ typ with
824- | Int -> " int" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
825- | Long -> " long" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
826- | Short -> " short" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
827- | Byte -> " byte" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
828- | Float -> " float" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
829- | Double -> " double" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
830- | Char -> " char" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
831- | String -> " String" ^ array_code (get_array_dim typ) " " ^ " " ^ snd v
832- | Object name ->
833- (get_short_class_name name |> Utils. replace_nested_symbol)
834- ^ array_code (get_array_dim typ) " "
835- ^ " " ^ snd v
836- | _ -> " " )
835+ | Array typ -> array_var_code typ v
837836 | _ -> " "
838837
839838 let recv_name_code recv func =
0 commit comments