浏览代码

[macro] run `remove_generic_base` in macro context

closes #9366
Simon Krajewski 5 年之前
父节点
当前提交
0bbbbfe94c
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. 1 6
      src/typing/macroContext.ml

+ 1 - 6
src/typing/macroContext.ml

@@ -417,12 +417,6 @@ and flush_macro_context mint ctx =
 	let mctx = (match ctx.g.macros with None -> die "" | Some (_,mctx) -> mctx) in
 	ctx.g.do_finalize mctx;
 	let _, types, modules = ctx.g.do_generate mctx in
-	(* Ignore removable classes: These don't have filters run on them, so trying to generate
-	   them might lead to errors (issue #9366). *)
-	let types = List.filter (function
-		| TClassDecl c when FiltersCommon.is_removable_class c -> false
-		| _ -> true
-	) types in
 	mctx.com.types <- types;
 	mctx.com.Common.modules <- modules;
 	(* we should maybe ensure that all filters in Main are applied. Not urgent atm *)
@@ -460,6 +454,7 @@ and flush_macro_context mint ctx =
 			()
 	in
 	let type_filters = [
+		Filters.remove_generic_base mctx;
 		Exceptions.patch_constructors mctx;
 		Filters.add_field_inits (RenameVars.init mctx.com) mctx;
 		minimal_restore;