소스 검색

transform private types by just using their name path

Simon Krajewski 10 년 전
부모
커밋
040f21a3cd
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      type.ml

+ 10 - 0
type.ml

@@ -2150,6 +2150,16 @@ module TExprToExpr = struct
 			(match !r with
 			| None -> raise Exit
 			| Some t -> convert_type t)
+		| TInst ({cl_private = true; cl_path=_,name},tl)
+		| TEnum ({e_private = true; e_path=_,name},tl)
+		| TType ({t_private = true; t_path=_,name},tl)
+		| TAbstract ({a_private = true; a_path=_,name},tl) ->
+			CTPath {
+				tpackage = [];
+				tname = name;
+				tparams = List.map (fun t -> TPType (convert_type t)) tl;
+				tsub = None;
+			}
 		| TEnum (e,pl) ->
 			tpath e.e_path e.e_module.m_path (List.map convert_type pl)
 		| TInst({cl_kind = KTypeParameter _} as c,pl) ->