Add more override tests with public state variables

This commit is contained in:
Leonardo Alt
2019-12-11 15:15:51 +01:00
committed by chriseth
parent 70623665bf
commit 1fb62b91d2
38 changed files with 220 additions and 22 deletions
+3 -2
View File
@@ -26,6 +26,7 @@
#include <libsolidity/analysis/TypeChecker.h>
#include <liblangutil/ErrorReporter.h>
#include <libdevcore/Visitor.h>
#include <boost/range/adaptor/reversed.hpp>
#include <boost/algorithm/string/predicate.hpp>
@@ -490,7 +491,7 @@ void OverrideChecker::checkOverride(OverrideProxy const& _overriding, OverridePr
);
if (!_overriding.overrides())
overrideError(_overriding, _super, "Overriding " + _overriding.astNodeName() + " is missing 'override' specifier.");
overrideError(_overriding, _super, "Overriding " + _overriding.astNodeName() + " is missing \"override\" specifier.");
if (_super.isVariable())
overrideError(
@@ -571,7 +572,7 @@ void OverrideChecker::overrideListError(
for (Declaration const* c: _secondary)
{
ssl.append("This contract: ", c->location());
names.insert(c->name());
names.insert("\"" + c->name() + "\"");
}
string contractSingularPlural = "contract ";
if (_secondary.size() > 1)