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

check for cf_overloads instead of CfOverloads

The flag isn't set for ghetto overloads, so this should catch all relevant cases.
Simon Krajewski преди 1 година
родител
ревизия
f21d85c5d3
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/compiler/hxb/hxbWriter.ml

+ 2 - 2
src/compiler/hxb/hxbWriter.ml

@@ -367,10 +367,10 @@ class ['a] hxb_writer
 		try
 			chunk#write_uleb128 (class_fields#get cf)
 		with Not_found ->
-			let depth,cf = if not (has_class_field_flag cf CfOverload) then
+			let cf_base = find_field c cf.cf_name kind in
+			let depth,cf = if cf_base.cf_overloads = [] then
 				0,cf
 			else begin
-				let cf_base = find_field c cf.cf_name kind in
 				let rec loop depth cfl = match cfl with
 					| cf' :: cfl ->
 						if cf' == cf then