diff --git a/gitlab-pages/docs/reference/current.md b/gitlab-pages/docs/reference/current.md index 554f4e0a5..c9f1945d8 100644 --- a/gitlab-pages/docs/reference/current.md +++ b/gitlab-pages/docs/reference/current.md @@ -11,17 +11,17 @@ Get the balance for the contract. ```pascaligo -function main (const p : unit; const s: tez) : list(operation) * storage is +function main (const p : unit; const s: tez) : list(operation) * tez is ((nil : list(operation)), balance) ``` ```cameligo -let main (p, s : unit * storage) = +let main (p, s : unit * tez) = ([] : operation list), balance ``` ```reasonligo -let main = (p: unit, storage) => ([]: list(operation), balance); +let main = ((p,s): (unit, tez)) => ([]: list(operation), balance); ``` @@ -293,25 +293,22 @@ Cause the contract to fail with an error message. ```pascaligo -function main (const p : param; const s : unit) : list(operation) * unit is +function main (const p : int; const s : unit) : list(operation) * unit is block { - case p of - | Zero (n) -> if n > 0n then failwith("fail") else skip - | Pos (n) -> if n > 0n then skip else failwith("fail") - end + if p > 10 then failwith("fail") else skip; } with ((nil : list(operation)), s) ``` ```cameligo -let main (p: unit) storage = +let main (p,s: unit * unit) = if true then failwith "This contract always fails" else () ``` ```reasonligo -let main = (p: unit, storage) => +let main = ((p,s): (unit, unit)) => if (true) { failwith("This contract always fails"); } else { diff --git a/src/test/md_file_tests.ml b/src/test/md_file_tests.ml index 15e7e1767..c728a929d 100644 --- a/src/test/md_file_tests.ml +++ b/src/test/md_file_tests.ml @@ -128,6 +128,7 @@ let md_files = [ "/gitlab-pages/docs/reference/big_map.md"; "/gitlab-pages/docs/reference/string.md"; "/gitlab-pages/docs/reference/crypto.md"; + "/gitlab-pages/docs/reference/current.md"; ] let md_root = "../../gitlab-pages/docs/language-basics/"