Removed corner case that could not be triggered in PascaLIGO simplifier.

This commit is contained in:
Christian Rinderknecht 2019-10-17 18:46:40 +02:00
parent 36d9858e97
commit e53d4035d0

View File

@ -545,11 +545,8 @@ and simpl_fun_declaration :
fun ~loc x -> fun ~loc x ->
let open! Raw in let open! Raw in
let {name;param;ret_type;local_decls;block;return} : fun_decl = x in let {name;param;ret_type;local_decls;block;return} : fun_decl = x in
(match npseq_to_list param.value.inside with (match param.value.inside with
| [] -> a, [] -> (
fail @@
corner_case ~loc:__LOC__ "parameter-less function should not exist"
| [a] -> (
let%bind input = simpl_param a in let%bind input = simpl_param a in
let name = name.value in let name = name.value in
let (binder , input_type) = input in let (binder , input_type) = input in
@ -570,6 +567,7 @@ and simpl_fun_declaration :
ok ((name , type_annotation) , expression) ok ((name , type_annotation) , expression)
) )
| lst -> ( | lst -> (
let lst = npseq_to_list lst in
let arguments_name = "arguments" in let arguments_name = "arguments" in
let%bind params = bind_map_list simpl_param lst in let%bind params = bind_map_list simpl_param lst in
let (binder , input_type) = let (binder , input_type) =