|
@@ -3801,12 +3801,12 @@ let make_macro_api ctx p =
|
|
);
|
|
);
|
|
Interp.get_local_type = (fun() ->
|
|
Interp.get_local_type = (fun() ->
|
|
match ctx.g.get_build_infos() with
|
|
match ctx.g.get_build_infos() with
|
|
- | Some (mt,_) ->
|
|
|
|
|
|
+ | Some (mt,tl,_) ->
|
|
Some (match mt with
|
|
Some (match mt with
|
|
- | TClassDecl c -> TInst (c,List.map snd c.cl_types)
|
|
|
|
- | TEnumDecl e -> TEnum (e,List.map snd e.e_types)
|
|
|
|
- | TTypeDecl t -> TType (t,List.map snd t.t_types)
|
|
|
|
- | TAbstractDecl a -> TAbstract(a,List.map snd a.a_types))
|
|
|
|
|
|
+ | TClassDecl c -> TInst (c,tl)
|
|
|
|
+ | TEnumDecl e -> TEnum (e,tl)
|
|
|
|
+ | TTypeDecl t -> TType (t,tl)
|
|
|
|
+ | TAbstractDecl a -> TAbstract(a,tl))
|
|
| None ->
|
|
| None ->
|
|
if ctx.curclass == null_class then
|
|
if ctx.curclass == null_class then
|
|
None
|
|
None
|
|
@@ -3830,7 +3830,7 @@ let make_macro_api ctx p =
|
|
Interp.get_build_fields = (fun() ->
|
|
Interp.get_build_fields = (fun() ->
|
|
match ctx.g.get_build_infos() with
|
|
match ctx.g.get_build_infos() with
|
|
| None -> Interp.VNull
|
|
| None -> Interp.VNull
|
|
- | Some (_,fields) -> Interp.enc_array (List.map Interp.encode_field fields)
|
|
|
|
|
|
+ | Some (_,_,fields) -> Interp.enc_array (List.map Interp.encode_field fields)
|
|
);
|
|
);
|
|
Interp.get_pattern_locals = (fun e t ->
|
|
Interp.get_pattern_locals = (fun e t ->
|
|
!get_pattern_locals_ref ctx e t
|
|
!get_pattern_locals_ref ctx e t
|
|
@@ -4120,7 +4120,7 @@ let type_macro ctx mode cpath f (el:Ast.expr list) p =
|
|
| Interp.VNull ->
|
|
| Interp.VNull ->
|
|
(match ctx.g.get_build_infos() with
|
|
(match ctx.g.get_build_infos() with
|
|
| None -> assert false
|
|
| None -> assert false
|
|
- | Some (_,fields) -> fields)
|
|
|
|
|
|
+ | Some (_,_,fields) -> fields)
|
|
| _ ->
|
|
| _ ->
|
|
List.map Interp.decode_field (Interp.dec_array v)
|
|
List.map Interp.decode_field (Interp.dec_array v)
|
|
) in
|
|
) in
|