Переглянути джерело

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