浏览代码

restore overrides that might have been changed by DCE

Nicolas Cannasse 13 年之前
父节点
当前提交
fd7235cb44
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      codegen.ml

+ 3 - 1
codegen.ml

@@ -547,7 +547,7 @@ let save_class_state ctx t = match t with
 	| TClassDecl c ->
 		let meta = c.cl_meta and path = c.cl_path and ext = c.cl_extern in
 		let fl = c.cl_fields and ofl = c.cl_ordered_fields and st = c.cl_statics and ost = c.cl_ordered_statics in
-		let cst = c.cl_constructor in
+		let cst = c.cl_constructor and over = c.cl_overrides in
 		c.cl_restore <- (fun() ->
 			c.cl_meta <- meta;
 			c.cl_extern <- ext;
@@ -557,10 +557,12 @@ let save_class_state ctx t = match t with
 			c.cl_statics <- st;
 			c.cl_ordered_statics <- ost;
 			c.cl_constructor <- cst;
+			c.cl_overrides <- over;
 		)
 	| _ ->
 		()
 
+		
 (* Checks if a private class' path clashes with another path *)
 let check_private_path ctx t = match t with
 	| TClassDecl c when c.cl_private ->