From 89f82c504b377f92541b2313256adf525d7b20da Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 6 May 2024 12:26:57 +0200 Subject: Catch new literal variants --- charon-pin | 2 +- compiler/ExtractTypes.ml | 3 +++ compiler/PureUtils.ml | 3 +++ flake.lock | 6 +++--- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/charon-pin b/charon-pin index d2e70db4..31dbf214 100644 --- a/charon-pin +++ b/charon-pin @@ -1,2 +1,2 @@ # This is the commit from https://github.com/AeneasVerif/charon that should be used with this version of aeneas. -1a205c55b02f3dff1ae238dfdac5a58d58de6006 +30ff93c24e5a1a6151d1c76f94c1d61ff1c34f70 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 diff --git a/flake.lock b/flake.lock index 14ee3c05..89f8b5a0 100644 --- a/flake.lock +++ b/flake.lock @@ -9,11 +9,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1715003183, - "narHash": "sha256-/bnkg8txVHgM5X4t2j6TQmDQ22Rb3SCgCMV9pAQGjp8=", + "lastModified": 1715695299, + "narHash": "sha256-50VuITmseECX64vbupU8bW4nG+TcEvUjL1FRmfSjyLw=", "owner": "aeneasverif", "repo": "charon", - "rev": "1a205c55b02f3dff1ae238dfdac5a58d58de6006", + "rev": "30ff93c24e5a1a6151d1c76f94c1d61ff1c34f70", "type": "github" }, "original": { -- cgit v1.2.3