Skip to content

[TM-363] No annotation matching inside `COMPARE` instruction

Description

It seems that our type checker does not produce a type check error when checking operations involving type annotations, that are forbidden by the babylonnet.sh script.

For example, this successfully typechecks in our typechecker, but is being rejected by babylonnet.sh

parameter (pair (nat :a) (nat :b));
storage unit;
code { UNPAIR;
       UNPAIR;
       COMPARE;
       DROP;
       NIL operation;
       PAIR};

So this MR resolves this issue.

TODO: Tests

Related issue(s)

https://issues.serokell.io/issue/TM-363

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:

Stylistic guide (mandatory)

Edited by Anton Myasnikov

Merge request reports