diff options
author | Aymeric Fromherz | 2024-05-01 15:31:47 +0200 |
---|---|---|
committer | Aymeric Fromherz | 2024-05-01 15:31:47 +0200 |
commit | 91a8ba9bbe37b831312bc42b8d9806748e01a82e (patch) | |
tree | 27ae871395222fc8732805612997d28f62f5375c /compiler | |
parent | 37cf570462cff897eaeb34d3a48179ae9597ce65 (diff) |
Add error when handling mutually recursive traits
Diffstat (limited to '')
-rw-r--r-- | compiler/Translate.ml | 5 |
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; |