Browse Source

[macro] run `remove_generic_base` in macro context

closes #9366
Simon Krajewski 5 years ago
parent
commit
0bbbbfe94c
1 changed files with 1 additions and 6 deletions
  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;