소스 검색

add std types to module context before calling onGenerate callback (closes #1904)

Simon Krajewski 12 년 전
부모
커밋
bcb5d17d91
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      typer.ml

+ 2 - 0
typer.ml

@@ -3410,6 +3410,8 @@ let make_macro_api ctx p =
 		Interp.on_generate = (fun f ->
 			Common.add_filter ctx.com (fun() ->
 				let t = macro_timer ctx "onGenerate" in
+				(* add standard types to current module so basic types can be resolved (issue #1904) *)
+				ctx.m.module_types <- ctx.m.module_types @ ctx.g.std.m_types;
 				f (List.map make_instance ctx.com.types);
 				t()
 			)