From 569e52e64c18b4fbb44268dcdaaac647eab051f8 Mon Sep 17 00:00:00 2001 From: Rudy Ges Date: Thu, 11 Apr 2024 10:08:44 +0200 Subject: [PATCH] Add pos to generated @:value metadata --- src/typing/typeloadFields.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/typing/typeloadFields.ml b/src/typing/typeloadFields.ml index 92f67fef2e6..136bc81d484 100644 --- a/src/typing/typeloadFields.ml +++ b/src/typing/typeloadFields.ml @@ -737,7 +737,7 @@ module TypeBinding = struct let p = cf.cf_pos in let ctx = TyperManager.clone_for_expr ctx_f (if fctx.is_static then FunStatic else FunMember) false in if (has_class_flag c CInterface) then unexpected_expression ctx.com fctx "Initialization on field of interface" (pos e); - cf.cf_meta <- ((Meta.Value,[e],null_pos) :: cf.cf_meta); + cf.cf_meta <- ((Meta.Value,[e],cf.cf_pos) :: cf.cf_meta); let check_cast e = (* insert cast to keep explicit field type (issue #1901) *) if type_iseq e.etype cf.cf_type then