Преглед на файлове

[typer] fix overload meta on overload (#9819)

Dmitrii Maganov преди 5 години
родител
ревизия
25b1e0cd3f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/typing/typeloadFields.ml

+ 1 - 1
src/typing/typeloadFields.ml

@@ -1609,7 +1609,7 @@ let init_class ctx c p context_init herits fields =
 						let mainf = PMap.find cf.cf_name (if fctx.is_static then c.cl_statics else c.cl_fields) in
 						if is_var mainf then display_error ctx "Cannot declare a variable with same name as a method" mainf.cf_pos;
 						(if not (has_class_field_flag mainf CfOverload) then display_error ctx ("Overloaded methods must have @:overload metadata") mainf.cf_pos);
-						mainf.cf_overloads <- cf :: mainf.cf_overloads
+						mainf.cf_overloads <- cf :: cf.cf_overloads @ mainf.cf_overloads
 					else
 						let type_kind,path = match c.cl_kind with
 							| KAbstractImpl a -> "abstract",a.a_path