|
@@ -1257,6 +1257,7 @@ and type_field ctx e i p mode =
|
|
(try
|
|
(try
|
|
let c = (match a.a_impl with None -> raise Not_found | Some c -> c) in
|
|
let c = (match a.a_impl with None -> raise Not_found | Some c -> c) in
|
|
let f = PMap.find i c.cl_statics in
|
|
let f = PMap.find i c.cl_statics in
|
|
|
|
+ if not (can_access ctx c f false) && not ctx.untyped then display_error ctx ("Cannot access private field " ^ i) p;
|
|
let field_type f =
|
|
let field_type f =
|
|
let t = field_type ctx c [] f p in
|
|
let t = field_type ctx c [] f p in
|
|
apply_params a.a_types pl t
|
|
apply_params a.a_types pl t
|