From 6841609362a6a18bf09ec7f1946b14c444c4a6db Mon Sep 17 00:00:00 2001 From: Lesenechal Remi Date: Mon, 6 Jan 2020 21:31:45 +0100 Subject: [PATCH] allow key_hash literals --- src/passes/3-self_ast_simplified/tezos_type_annotation.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/passes/3-self_ast_simplified/tezos_type_annotation.ml b/src/passes/3-self_ast_simplified/tezos_type_annotation.ml index a6436257f..32f5fcb5c 100644 --- a/src/passes/3-self_ast_simplified/tezos_type_annotation.ml +++ b/src/passes/3-self_ast_simplified/tezos_type_annotation.ml @@ -17,6 +17,7 @@ let peephole_expression : expression -> expression result = fun e -> match e.expression with | E_ascription (e' , t) as e -> ( match (e'.expression , t.type_expression') with + | (E_literal (Literal_string s) , T_constant (TC_key_hash)) -> return @@ E_literal (Literal_key_hash s) | (E_literal (Literal_int i) , T_constant (TC_timestamp)) -> return @@ E_literal (Literal_timestamp i) | (E_literal (Literal_string str) , T_constant (TC_timestamp)) -> let%bind time =