|
@@ -1472,7 +1472,11 @@ let init_class ctx c p context_init herits fields =
|
|
|
(if not (Meta.has Meta.Overload mainf.cf_meta) then display_error ctx ("Overloaded methods must have @:overload metadata") mainf.cf_pos);
|
|
|
mainf.cf_overloads <- cf :: mainf.cf_overloads
|
|
|
else
|
|
|
- display_error ctx ("Duplicate class field declaration : " ^ s_type_path c.cl_path ^ "." ^ cf.cf_name) p
|
|
|
+ let type_kind,path = match c.cl_kind with
|
|
|
+ | KAbstractImpl a -> "abstract",a.a_path
|
|
|
+ | _ -> "class",c.cl_path
|
|
|
+ in
|
|
|
+ display_error ctx ("Duplicate " ^ type_kind ^ " field declaration : " ^ s_type_path path ^ "." ^ cf.cf_name) p
|
|
|
else
|
|
|
if fctx.do_add then add_field c cf (fctx.is_static || fctx.is_macro && ctx.in_macro)
|
|
|
end
|