new negative test

This commit is contained in:
Pierre-Emmanuel Wulfman 2020-03-03 17:45:59 +01:00
parent dfb1e1ebef
commit c23827e8de
2 changed files with 22 additions and 0 deletions

View File

@ -19,6 +19,19 @@ let%expect_test _ =
ligo: in file "error_function_annotation_2.mligo", line 1, characters 14-43. different kinds: {"a":"int","b":"( int * int ) -> int"}
If you're not sure how to fix this error, you can
do one of the following:
* Visit our documentation: https://ligolang.org/docs/intro/what-and-why/
* Ask a question on our Discord: https://discord.gg/9rhYaEt
* Open a gitlab issue: https://gitlab.com/ligolang/ligo/issues/new
* Check the changelog by running 'ligo changelog' |}];
run_ligo_bad [ "compile-contract" ; "../../test/contracts/negative/error_function_annotation_3.mligo"; "f"];
[%expect {|
ligo: in file "", line 0, characters 0-0. different kinds: {"a":"( (TO_list(operation)) * sum[Add -> int , Sub -> int] )","b":"sum[Add -> int , Sub -> int]"}
If you're not sure how to fix this error, you can
do one of the following:

View File

@ -0,0 +1,9 @@
type op =
| Add of int
| Sub of int
let main (p,s : int * op) : (operation list) * op =
match s with
| Add si -> Add si
| Sub si -> Sub si