|
@@ -316,6 +316,9 @@ let type_field cfg ctx e i p mode (with_type : WithType.t) =
|
|
acc
|
|
acc
|
|
) c.cl_implements
|
|
) c.cl_implements
|
|
in
|
|
in
|
|
|
|
+ let no_no_lookup cf =
|
|
|
|
+ if has_class_field_flag cf CfNoLookup then display_error ctx.com "This field cannot be accessed explicitly" pfield
|
|
|
|
+ in
|
|
let rec type_field_by_type e t =
|
|
let rec type_field_by_type e t =
|
|
let field_access = field_access e in
|
|
let field_access = field_access e in
|
|
match t with
|
|
match t with
|
|
@@ -345,6 +348,7 @@ let type_field cfg ctx e i p mode (with_type : WithType.t) =
|
|
let t = enum_field_type ctx en c p in
|
|
let t = enum_field_type ctx en c p in
|
|
AKExpr (mk (TField (e,fmode)) t p)
|
|
AKExpr (mk (TField (e,fmode)) t p)
|
|
| Statics c ->
|
|
| Statics c ->
|
|
|
|
+ no_no_lookup f;
|
|
field_access f (FHStatic c)
|
|
field_access f (FHStatic c)
|
|
| _ ->
|
|
| _ ->
|
|
field_access f FHAnon
|
|
field_access f FHAnon
|
|
@@ -403,6 +407,7 @@ let type_field cfg ctx e i p mode (with_type : WithType.t) =
|
|
let c = find_some a.a_impl in
|
|
let c = find_some a.a_impl in
|
|
let f = PMap.find i c.cl_statics in
|
|
let f = PMap.find i c.cl_statics in
|
|
if not (has_class_field_flag f CfImpl) then raise Not_found;
|
|
if not (has_class_field_flag f CfImpl) then raise Not_found;
|
|
|
|
+ no_no_lookup f;
|
|
field_access f (FHAbstract (a,tl,c))
|
|
field_access f (FHAbstract (a,tl,c))
|
|
with Not_found ->
|
|
with Not_found ->
|
|
type_field_by_forward_member type_field_by_type e a tl
|
|
type_field_by_forward_member type_field_by_type e a tl
|