소스 검색

fixed again #2555, this time correctly keep the private class path (a.b._C.Name becomes a.b.Name as if it was public)

Nicolas Cannasse 11 년 전
부모
커밋
518552990c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      typer.ml

+ 1 - 1
typer.ml

@@ -232,7 +232,7 @@ let rec can_access ctx ?(in_overload=false) c cf stat =
 	(* has metadata path *)
 	let make_path c f = match c.cl_kind with
 		| KAbstractImpl a -> fst a.a_path @ [snd a.a_path; f.cf_name]
-		| _ when c.cl_private -> [snd c.cl_path; f.cf_name]
+		| _ when c.cl_private -> List.rev (f.cf_name :: snd c.cl_path :: (List.tl (List.rev (fst c.cl_path))))
 		| _ -> fst c.cl_path @ [snd c.cl_path; f.cf_name]
 	in
 	let rec expr_path acc e =