summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorSon Ho2023-11-24 17:04:26 +0100
committerSon Ho2023-11-24 17:04:26 +0100
commit1b446285bbbe356ead7c0e521799b35020f08147 (patch)
treea0127eda8f8378392d9fa0213eb142d73759e3c6 /compiler
parentbacf3f5f6f5f6a9aa650d5ae8d12a132fd747039 (diff)
Make a minor update in ExtractName.pattern_to_extract_name
Diffstat (limited to '')
-rw-r--r--compiler/ExtractName.ml5
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