Check for circular constants across contracts.

This commit is contained in:
chriseth
2020-10-08 18:56:17 +02:00
parent c4d8b4fa0e
commit 21dee1c8ba
3 changed files with 36 additions and 10 deletions
+7
View File
@@ -54,6 +54,9 @@ public:
{
Checker(langutil::ErrorReporter& _errorReporter):
m_errorReporter(_errorReporter) {}
/// Called after all source units have been visited.
virtual void finalize() {}
protected:
langutil::ErrorReporter& m_errorReporter;
};
@@ -63,6 +66,9 @@ public:
bool check(ASTNode const& _astRoot);
/// Called after all source units have been visited.
bool finalize();
private:
bool visit(ContractDefinition const& _contract) override;
void endVisit(ContractDefinition const& _contract) override;
@@ -77,6 +83,7 @@ private:
bool visit(FunctionCall const& _functionCall) override;
bool visit(Identifier const& _identifier) override;
bool visit(MemberAccess const& _identifier) override;
bool visit(StructDefinition const& _struct) override;
void endVisit(StructDefinition const& _struct) override;