Browse Source

bugfix in interfaces

Nicolas Cannasse 9 năm trước cách đây
mục cha
commit
7f74f20a3f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/generators/genhl.ml

+ 1 - 1
src/generators/genhl.ml

@@ -567,7 +567,7 @@ and class_type ?(tref=None) ctx c pl statics =
 			List.iter (fun (i,pl) ->
 				let fid = DynArray.length fa in
 				let t = to_type ctx (TInst (i,pl)) in
-				p.pinterfaces <- PMap.add t fid p.pinterfaces;
+				p.pinterfaces <- PMap.add t (fid + start_field) p.pinterfaces;
 				DynArray.add fa ("", 0, t);
 			) c.cl_implements;
 			(* check toString *)