浏览代码

[debug] fix type parameter dumping

Simon Krajewski 5 年之前
父节点
当前提交
b7016b3b3e
共有 2 个文件被更改,包括 5 次插入2 次删除
  1. 4 1
      src/codegen/codegen.ml
  2. 1 1
      src/core/tPrinting.ml

+ 4 - 1
src/codegen/codegen.ml

@@ -282,7 +282,10 @@ module Dump = struct
 
 	let dump_types com s_expr =
 		let s_type = s_type (Type.print_context()) in
-		let params tl = match tl with [] -> "" | l -> Printf.sprintf "<%s>" (String.concat "," (List.map (fun (n,t) -> n ^ " : " ^ s_type t) l)) in
+		let params tl = match tl with
+			| [] -> ""
+			| l -> Printf.sprintf "<%s>" (String.concat ", " (List.map Printer.s_type_param l))
+		in
 		List.iter (fun mt ->
 			let path = Type.t_path mt in
 			let buf,close = create_dumpfile_from_path com path in

+ 1 - 1
src/core/tPrinting.ml

@@ -475,7 +475,7 @@ module Printer = struct
 		| TInst({cl_kind = KTypeParameter tl1},tl2) ->
 			begin match tl1 with
 			| [] -> s
-			| _ -> Printf.sprintf "%s:%s" s (String.concat ", " (List.map s_type tl1))
+			| _ -> Printf.sprintf "%s:%s" s (String.concat " & " (List.map s_type tl1))
 			end
 		| _ -> die "" __LOC__