From 91a8ba9bbe37b831312bc42b8d9806748e01a82e Mon Sep 17 00:00:00 2001 From: Aymeric Fromherz Date: Wed, 1 May 2024 15:31:47 +0200 Subject: Add error when handling mutually recursive traits --- compiler/Translate.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'compiler') diff --git a/compiler/Translate.ml b/compiler/Translate.ml index 222b3c57..72a98c3d 100644 --- a/compiler/Translate.ml +++ b/compiler/Translate.ml @@ -798,7 +798,10 @@ let extract_definitions (fmt : Format.formatter) (config : gen_config) (* Translate *) export_functions_group pure_funs | GlobalGroup id -> export_global id - | TraitDeclGroup id -> + | TraitDeclGroup (RecGroup _ids) -> + craise_opt_meta __FILE__ __LINE__ None + "Mutually recursive trait declarations are not supported" + | TraitDeclGroup (NonRecGroup id) -> (* TODO: update to extract groups *) if config.extract_trait_decls && config.extract_transparent then ( export_trait_decl_group id; -- cgit v1.2.3