[#163] remove unnecessary TcOriginatedContracts usages
Description
Problem: TcOriginatedContracts
is used to typecheck a value of type
contract p
. After the Babylon update this can only happen in a parameter.
However, we store tcContracts
in TypeCheckEnv
and often blindly pass
mempty
or set it to error
.
Solution: remove tcContracts
from TypeCheckEnv
and use
TcOriginatedContracts
only for typeCheck functions that needs it.
typeCheckParameter
has been added for this purpose.
Additionally, unnecesary type-checking functions based on it have
been removed.
Related issue(s)
Resolves #163 (closed)
✅ 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
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Pinto Pasquale