Browse Source

keep empty abstract implementation class if it is used (closes #2454)

Simon Krajewski 11 years ago
parent
commit
d77c9cd207
1 changed files with 1 additions and 1 deletions
  1. 1 1
      filters.ml

+ 1 - 1
filters.ml

@@ -1107,7 +1107,7 @@ let run com tctx main =
 	if not (Common.defined com Define.As3 || dce_mode = "no" || Common.defined com Define.DocGen) then Dce.run com main (dce_mode = "full" && not (Common.defined com Define.Interp));
 	(* always filter empty abstract implementation classes (issue #1885) *)
 	List.iter (fun mt -> match mt with
-		| TClassDecl({cl_kind = KAbstractImpl _} as c) when c.cl_ordered_statics = [] && c.cl_ordered_fields = [] -> c.cl_extern <- true
+		| TClassDecl({cl_kind = KAbstractImpl _} as c) when c.cl_ordered_statics = [] && c.cl_ordered_fields = [] && not (Meta.has Meta.Used c.cl_meta) -> c.cl_extern <- true
 		| _ -> ()
 	) com.types;
 	(* PASS 3: type filters *)