Skip to content

Add parenthesis around typed pattern when decompiling cameligo

E. Rivas requested to merge er433/fix/transpile-ptyped-cameligo into dev
  • has a changelog entry

One line change in CameLIGO's decompiler, add parenthesis around typed pattern, fixing:

$ ligo transpile-expression cameligo "(fun (x : nat) -> x) 1n" cameligo
(fun x : nat -> x) 1n
$ ligo transpile-expression cameligo "(fun (x : nat) -> x) 1n" cameligo | xargs -I{} ligo compile-expression cameligo {}
Ill-formed function expression.
At this point, if the parameter is complete, one of the following is
expected:
  * another parameter as an irrefutable pattern (for instance, a
    variable);
  * an arrow '->' followed by the function body as an expression, if
    there are no more parameters.

i.e. missing parenthesis around x : nat.

Edited by E. Rivas

Merge request reports

Loading