소스 검색

[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;