Просмотр исходного кода

[interp] accept VClosure as onGenerate (closes #3427)

Simon Krajewski 10 лет назад
Родитель
Сommit
af2ec47014
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      interp.ml

+ 1 - 1
interp.ml

@@ -2212,7 +2212,7 @@ let macro_lib =
 		);
 		"on_generate", Fun1 (fun f ->
 			match f with
-			| VFunction (Fun1 _) ->
+			| VFunction (Fun1 _) | VClosure _ ->
 				let ctx = get_ctx() in
 				ctx.curapi.on_generate (fun tl ->
 					ignore(catch_errors ctx (fun() -> ctx.do_call VNull f [enc_array (List.map encode_type tl)] null_pos));