Skip to content

Resolve " Error message precision when using wrong argument type"

The type of was, according to documentation, : ('a -> 'b) -> 'a -> michelson_program. However, this type was not checked, and things were failing run-time.

This MR solves this problems by taking the following actions:

  1. Added correct type checking for according to documentation.
  2. The measure in 1 prevents some usages, so we also add Test.decompile : michelson_program -> 'a that tries to decompile a Michelson program according to annotation (this was automatically done under the hood). This primitive can raise run-time errors (as it might be the michelson_program does not correspond to the type annotation).
  3. Improves some error messages in decompilation, giving not only the expected type, but also what got.
  • has a changelog entry

Closes #1336 (closed)

Edited by E. Rivas

Merge request reports