summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorGuillaume Boisseau2024-05-14 17:46:38 +0200
committerGitHub2024-05-14 17:46:38 +0200
commitcbf425d178f9063507585233ebee7ca785567e3a (patch)
tree79151f8118306e89da79e8202e2b9fc76d143400 /compiler
parentd7390c53fba81768bfa08645e18dff4f613d7aa4 (diff)
parent89f82c504b377f92541b2313256adf525d7b20da (diff)
Merge pull request #172 from AeneasVerif/string-literals
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ExtractTypes.ml3
-rw-r--r--compiler/PureUtils.ml3
2 files changed, 6 insertions, 0 deletions
diff --git a/compiler/ExtractTypes.ml b/compiler/ExtractTypes.ml
index 947eceff..6a6067de 100644
--- a/compiler/ExtractTypes.ml
+++ b/compiler/ExtractTypes.ml
@@ -70,6 +70,9 @@ let extract_literal (meta : Meta.meta) (fmt : F.formatter) (inside : bool)
in
F.pp_print_string fmt c;
if inside then F.pp_print_string fmt ")")
+ | VStr _ | VByteStr _ ->
+ craise __FILE__ __LINE__ meta
+ "String and byte string literals are unsupported"
(** Format a unary operation
diff --git a/compiler/PureUtils.ml b/compiler/PureUtils.ml
index fdd14eba..82a578d9 100644
--- a/compiler/PureUtils.ml
+++ b/compiler/PureUtils.ml
@@ -90,6 +90,9 @@ let compute_literal_type (cv : literal) : literal_type =
| VScalar sv -> TInteger sv.int_ty
| VBool _ -> TBool
| VChar _ -> TChar
+ | VStr _ | VByteStr _ ->
+ craise_opt_meta __FILE__ __LINE__ None
+ "String and byte string literals are unsupported"
let var_get_id (v : var) : VarId.id = v.id