WIP: [TM-47] Prohibit creation a contract wrong literal
Description
Problem: one can try to PUSH a contract's address which doesn't exist and then try to call this contract. As result, code isn't so typesafe, how it could be. As well, it diverses with reference implementation.
Solution: pass to typechecker's environment a map from contract's address to its type parameter and verify that every PUSH of a contract is valid, namely, a contract's type in PUSH converges with a type parameter of a corresponding contract from the map. Functions which depends on typechecking also takes this map now.
Related issue(s)
https://issues.serokell.io/issue/TM-47
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests
-
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 Ilya Peresadin