diff options
author | Son Ho | 2023-11-24 17:04:26 +0100 |
---|---|---|
committer | Son Ho | 2023-11-24 17:04:26 +0100 |
commit | 1b446285bbbe356ead7c0e521799b35020f08147 (patch) | |
tree | a0127eda8f8378392d9fa0213eb142d73759e3c6 /compiler | |
parent | bacf3f5f6f5f6a9aa650d5ae8d12a132fd747039 (diff) |
Make a minor update in ExtractName.pattern_to_extract_name
Diffstat (limited to '')
-rw-r--r-- | compiler/ExtractName.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/ExtractName.ml b/compiler/ExtractName.ml index 41c81207..c0a23080 100644 --- a/compiler/ExtractName.ml +++ b/compiler/ExtractName.ml @@ -61,7 +61,10 @@ let pattern_to_extract_name (is_trait_impl : bool) (name : pattern) : | TArray -> "Array" | TSlice -> "Slice" else expr_to_string c ty - | ERef _ | EVar _ -> raise (Failure "")) + | ERef _ | EVar _ -> + (* We simply convert the pattern to a string. This is not very + satisfying but we should rarely get there. *) + expr_to_string c ty) in let rec pattern_to_string (n : pattern) : string list = match n with |