瀏覽代碼

bug fix in private path generation.

Nicolas Cannasse 19 年之前
父節點
當前提交
24b805a539
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      typer.ml

+ 1 - 1
typer.ml

@@ -1670,7 +1670,7 @@ let type_module ctx m tdecls =
 	(* PASS 1 : build module structure - does not load any module or type - should be atomic ! *)
 	let decls = ref [] in
 	let decl_with_name name p priv =
-		let tpath = if priv then (fst m @ [snd m], name) else (fst m, name) in
+		let tpath = if priv then (fst m @ ["_" ^ snd m], name) else (fst m, name) in
 		if priv then begin
 			if List.exists (fun t -> tpath = t_path t) (!decls) then error ("Type name " ^ name ^ " is alreday defined in this module") p;
 			tpath