Browse Source

Forward metadata for static local vars

Allow things like @:persistent to work with static locals
Rudy Ges 2 năm trước cách đây
mục cha
commit
62bdf35ee8
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      src/filters/filters.ml

+ 1 - 0
src/filters/filters.ml

@@ -75,6 +75,7 @@ module LocalStatic = struct
 			raise_typing_error ~depth:1 "Conflicting field was found here" cf.cf_name_pos;
 		with Not_found ->
 			let cf = mk_field name ~static:true v.v_type v.v_pos v.v_pos in
+			cf.cf_meta <- v.v_meta;
 			begin match eo with
 			| None ->
 				()