Prechádzať zdrojové kódy

properly remove interface

Simon Krajewski 9 rokov pred
rodič
commit
4cfee9a55a
2 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 1 0
      filters.ml
  2. 1 1
      tests/unit/src/unit/TestDCE.hx

+ 1 - 0
filters.ml

@@ -1141,6 +1141,7 @@ let do_the_tivo_thing ctx =
 	let run = substitute_expr in
 	let run = substitute_expr in
 	List.iter (fun mt -> match mt with
 	List.iter (fun mt -> match mt with
 		| TClassDecl c ->
 		| TClassDecl c ->
+			if get_substitute_class c != c2 then c.cl_meta <- (Meta.Remove,[],c.cl_pos) :: c.cl_meta;
 			let rec process_field f =
 			let rec process_field f =
 				f.cf_type <- substitute_type f.cf_type;
 				f.cf_type <- substitute_type f.cf_type;
 				begin match f.cf_expr with
 				begin match f.cf_expr with

+ 1 - 1
tests/unit/src/unit/TestDCE.hx

@@ -112,7 +112,7 @@ class TestDCE extends Test {
 		hf(c, "set_x");
 		hf(c, "set_x");
 		hf(bc, "set_x");
 		hf(bc, "set_x");
 		//hf(ic, "set_x");
 		//hf(ic, "set_x");
-		nhf(ic, "get_x");
+		//nhf(ic, "get_x");
 		nhf(c, "get_x");
 		nhf(c, "get_x");
 		nhf(bc, "get_x");
 		nhf(bc, "get_x");
 	}
 	}