@@ -174,6 +174,7 @@ module CT = struct
174174 let map sub {pcty_loc = loc ; pcty_desc = desc ; pcty_attributes = attrs } =
175175 let open Cty in
176176 let loc = sub.location sub loc in
177+ let attrs = sub.attributes sub attrs in
177178 match desc with
178179 | Pcty_constr (lid , tys ) ->
179180 constr ~loc ~attrs (map_loc sub lid) (List. map (sub.typ sub) tys)
@@ -186,6 +187,7 @@ module CT = struct
186187 =
187188 let open Ctf in
188189 let loc = sub.location sub loc in
190+ let attrs = sub.attributes sub attrs in
189191 match desc with
190192 | Pctf_inherit ct -> inherit_ ~loc ~attrs (sub.class_type sub ct)
191193 | Pctf_val (s , m , v , t ) -> val_ ~loc ~attrs s m v (sub.typ sub t)
@@ -410,6 +412,7 @@ module CE = struct
410412 let map sub {pcl_loc = loc ; pcl_desc = desc ; pcl_attributes = attrs } =
411413 let open Cl in
412414 let loc = sub.location sub loc in
415+ let attrs = sub.attributes sub attrs in
413416 match desc with
414417 | Pcl_constr (lid , tys ) ->
415418 constr ~loc ~attrs (map_loc sub lid) (List. map (sub.typ sub) tys)
@@ -437,6 +440,7 @@ module CE = struct
437440 let map_field sub {pcf_desc = desc ; pcf_loc = loc ; pcf_attributes = attrs } =
438441 let open Cf in
439442 let loc = sub.location sub loc in
443+ let attrs = sub.attributes sub attrs in
440444 match desc with
441445 | Pcf_inherit (o , ce , s ) -> inherit_ ~loc ~attrs o (sub.class_expr sub ce) s
442446 | Pcf_val (s , m , k ) -> val_ ~loc ~attrs (map_loc sub s) m (map_kind sub k)
0 commit comments