|
@@ -753,13 +753,21 @@ module TypeBinding = struct
|
|
| TMono r -> (match r.tm_type with None -> false | Some t -> is_full_type t)
|
|
| TMono r -> (match r.tm_type with None -> false | Some t -> is_full_type t)
|
|
| TAbstract _ | TInst _ | TEnum _ | TLazy _ | TDynamic _ | TAnon _ | TType _ -> true
|
|
| TAbstract _ | TInst _ | TEnum _ | TLazy _ | TDynamic _ | TAnon _ | TType _ -> true
|
|
in
|
|
in
|
|
- let force_macro () =
|
|
|
|
|
|
+ let force_macro display =
|
|
(* force macro system loading of this class in order to get completion *)
|
|
(* force macro system loading of this class in order to get completion *)
|
|
- delay ctx PTypeField (fun() -> try ignore(ctx.g.do_macro ctx MDisplay c.cl_path cf.cf_name [] p) with Exit | Error _ -> ())
|
|
|
|
|
|
+ delay ctx PTypeField (fun() ->
|
|
|
|
+ try
|
|
|
|
+ ignore(ctx.g.do_macro ctx MDisplay c.cl_path cf.cf_name [] p)
|
|
|
|
+ with
|
|
|
|
+ | Exit ->
|
|
|
|
+ ()
|
|
|
|
+ | Error _ when display ->
|
|
|
|
+ ()
|
|
|
|
+ )
|
|
in
|
|
in
|
|
let handle_display_field () =
|
|
let handle_display_field () =
|
|
if fctx.is_macro && not ctx.in_macro then
|
|
if fctx.is_macro && not ctx.in_macro then
|
|
- force_macro()
|
|
|
|
|
|
+ force_macro true
|
|
else begin
|
|
else begin
|
|
cf.cf_type <- TLazy r;
|
|
cf.cf_type <- TLazy r;
|
|
cctx.delayed_expr <- (ctx,Some r) :: cctx.delayed_expr;
|
|
cctx.delayed_expr <- (ctx,Some r) :: cctx.delayed_expr;
|
|
@@ -767,14 +775,14 @@ module TypeBinding = struct
|
|
in
|
|
in
|
|
if ctx.com.display.dms_full_typing then begin
|
|
if ctx.com.display.dms_full_typing then begin
|
|
if fctx.is_macro && not ctx.in_macro then
|
|
if fctx.is_macro && not ctx.in_macro then
|
|
- force_macro ()
|
|
|
|
|
|
+ force_macro false
|
|
else begin
|
|
else begin
|
|
cf.cf_type <- TLazy r;
|
|
cf.cf_type <- TLazy r;
|
|
(* is_lib ? *)
|
|
(* is_lib ? *)
|
|
cctx.delayed_expr <- (ctx,Some r) :: cctx.delayed_expr;
|
|
cctx.delayed_expr <- (ctx,Some r) :: cctx.delayed_expr;
|
|
end
|
|
end
|
|
end else if ctx.com.display.dms_force_macro_typing && fctx.is_macro && not ctx.in_macro then
|
|
end else if ctx.com.display.dms_force_macro_typing && fctx.is_macro && not ctx.in_macro then
|
|
- force_macro()
|
|
|
|
|
|
+ force_macro true
|
|
else begin
|
|
else begin
|
|
if fctx.is_display_field then begin
|
|
if fctx.is_display_field then begin
|
|
handle_display_field()
|
|
handle_display_field()
|