summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorAymeric Fromherz2024-05-01 15:31:47 +0200
committerAymeric Fromherz2024-05-01 15:31:47 +0200
commit91a8ba9bbe37b831312bc42b8d9806748e01a82e (patch)
tree27ae871395222fc8732805612997d28f62f5375c /compiler
parent37cf570462cff897eaeb34d3a48179ae9597ce65 (diff)
Add error when handling mutually recursive traits
Diffstat (limited to '')
-rw-r--r--compiler/Translate.ml5
1 files changed, 4 insertions, 1 deletions
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;