Lambda_rec values are not typechecked
Description
I completely missed this in !1273 (merged) (in my defence, this is very badly documented), but long story short I forgot to implement type-checking Lambda_rec
values.
Steps to reproduce
morley -- emulate run --contract contracts/verbose-typecheck/apply.tz --storage 1 \
--parameter 'Lambda_rec { UNPAIR; DROP; DUP; IFEQ { DIP {DROP}; } { PUSH int 1; SWAP; SUB; PUSH int 0; PAIR; EXEC; } }'
Prerequisites (if needed):
Expected behaviour
Executed contract ...
It didn't return any operations.
It returned: 0.
Actual behaviour
The contract parameter is ill-typed: Error checking value:
Lambda_rec { UNPAIR;
DROP;
DUP;
{ EQ;
IF { DIP { DROP } }
{ PUSH int 1; SWAP; SUB; PUSH int 0; PAIR; EXEC } } }
Against type: lambda (pair int int) int
unexpected value
Error occurred on line 1 char 1.