Преглед на файлове

error on recursive `@:generic` functions for now (see #3523)

Simon Krajewski преди 10 години
родител
ревизия
544bc929b2
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      typer.ml

+ 1 - 1
typer.ml

@@ -1801,7 +1801,7 @@ let type_generic_function ctx (e,cf) el ?(using_param=None) with_type p =
 			end;
 			end;
 			ignore(follow cf.cf_type);
 			ignore(follow cf.cf_type);
 			cf2.cf_expr <- (match cf.cf_expr with
 			cf2.cf_expr <- (match cf.cf_expr with
-				| None -> None
+				| None -> error "Recursive @:generic function" p
 				| Some e -> Some (Codegen.generic_substitute_expr gctx e));
 				| Some e -> Some (Codegen.generic_substitute_expr gctx e));
 			cf2.cf_kind <- cf.cf_kind;
 			cf2.cf_kind <- cf.cf_kind;
 			cf2.cf_public <- cf.cf_public;
 			cf2.cf_public <- cf.cf_public;