|
@@ -3071,7 +3071,7 @@ and type_expr ctx (e,p) (with_type:with_type) =
|
|
|
if Meta.has Meta.CoreApi c.cl_meta then merge_core_doc c;
|
|
|
ctx.m.module_using <- c :: ctx.m.module_using;
|
|
|
PMap.fold (fun f acc ->
|
|
|
- if f.cf_name <> "_new" && can_access ctx c f true && Meta.has Meta.Impl f.cf_meta then begin
|
|
|
+ if f.cf_name <> "_new" && can_access ctx c f true && Meta.has Meta.Impl f.cf_meta && not (Meta.has Meta.Enum f.cf_meta) then begin
|
|
|
let f = prepare_using_field f in
|
|
|
let t = apply_params a.a_types pl (follow f.cf_type) in
|
|
|
PMap.add f.cf_name { f with cf_public = true; cf_type = opt_type t } acc
|
|
@@ -3085,7 +3085,7 @@ and type_expr ctx (e,p) (with_type:with_type) =
|
|
|
let is_abstract_impl = match c.cl_kind with KAbstractImpl _ -> true | _ -> false in
|
|
|
let pm = match c.cl_constructor with None -> PMap.empty | Some cf -> PMap.add "new" cf PMap.empty in
|
|
|
PMap.fold (fun f acc ->
|
|
|
- if can_access ctx c f true && (not is_abstract_impl || not (Meta.has Meta.Impl f.cf_meta)) then
|
|
|
+ if can_access ctx c f true && (not is_abstract_impl || not (Meta.has Meta.Impl f.cf_meta) || Meta.has Meta.Enum f.cf_meta) then
|
|
|
PMap.add f.cf_name { f with cf_public = true; cf_type = opt_type f.cf_type } acc else acc
|
|
|
) a.a_fields pm
|
|
|
| _ ->
|