summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Campbell2019-04-24 11:44:01 +0100
committerBrian Campbell2019-04-25 15:01:56 +0100
commitc5c2f3a9dc9c18463719647eb48ccccd84fbdc89 (patch)
tree82a50dbc9ba997b85b648891af710e70282d2af1 /src
parent73b5f711029ea8dd7463f79277f7c01527c5e3bf (diff)
Don't try to insert monomorphisation casts when the types are the same
Diffstat (limited to 'src')
-rw-r--r--src/monomorphise.ml1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/monomorphise.ml b/src/monomorphise.ml
index 9f273cb1..3f8a40e6 100644
--- a/src/monomorphise.ml
+++ b/src/monomorphise.ml
@@ -3182,6 +3182,7 @@ let make_bitvector_env_casts env quant_kids (kid,i) exp =
if mut = Immutable then mk_cast var typ exp else exp) locals exp
let make_bitvector_cast_exp cast_name cast_env quant_kids typ target_typ exp =
+ if alpha_equivalent cast_env typ target_typ then exp else
let infer_arg_typ env f l typ =
let (typq, ctor_typ) = Env.get_union_id f env in
let quants = quant_items typq in