浏览代码

fix conflicting names

Nicolas Cannasse 18 年之前
父节点
当前提交
4e5eee6643
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      genas3.ml

+ 2 - 2
genas3.ml

@@ -50,10 +50,10 @@ let s_path ctx path p =
 	| (pack,name) ->
 		try
 			(match Hashtbl.find ctx.imports name with
-			| p :: _ when p = pack ->
+			| [p] when p = pack ->
 				name
 			| packs ->
-				if not (List.mem pack packs) then Hashtbl.replace ctx.imports name (packs @ [pack]);
+				if not (List.mem pack packs) then Hashtbl.replace ctx.imports name (pack :: packs);
 				Ast.s_type_path path)
 		with Not_found ->
 			Hashtbl.add ctx.imports name [pack];