Remove unused declarations / check obj. LIGO
This MR prevents corner case failure when compiling a contract that contains Test primitives or types.
It does mainly two things:
-
It will remove unused
Declaration_constants /Declaration_modules, so that if someone was using aTestprimitive in an unused declaration,compile-contractwill still successfully work. -
The pass checking that
Testprimitives/types are not used is moved from the interpreter toself_ast_typed, and it is applied after removing unused declarations.
-
has a changelog entry
Edited by E. Rivas