소스 검색

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];