Merged requested to merge 1336-test-run-error-message-precision-when-using-wrong-argument-type into dev
The type of
Test.run was, according to documentation,
Test.run : ('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:
- Added correct type checking for
Test.runaccording to documentation.
- The measure in 1 prevents some usages, so we also add
Test.decompile : michelson_program -> 'athat 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_programdoes not correspond to the type annotation).
- Improves some error messages in decompilation, giving not only the expected type, but also what got.
has a changelog entry
Closes #1336 (closed)