瀏覽代碼

minor fix to display private static vars

Nicolas Cannasse 17 年之前
父節點
當前提交
0773de6917
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      typer.ml

+ 5 - 0
typer.ml

@@ -2059,6 +2059,11 @@ and type_expr ctx ?(need_val=true) (e,p) =
 				in
 				let fields = loop c params in
 				TAnon { a_fields = fields; a_status = ref Closed; }
+			| TAnon a as t ->
+				(match !(a.a_status) with
+				| Statics c when is_parent c ctx.curclass ->
+					TAnon { a_fields = PMap.map (fun f -> { f with cf_public = true }) a.a_fields; a_status = ref Closed }
+				| _ -> t)
 			| t -> t
 		) in
 		raise (Display t)