Merge remote-tracking branch 'origin/develop' into breaking

This commit is contained in:
chriseth
2020-07-08 09:37:14 +02:00
34 changed files with 278 additions and 74 deletions
@@ -151,13 +151,13 @@ void ContractLevelChecker::findDuplicateDefinitions(map<string, vector<T>> const
if constexpr (is_same_v<T, FunctionDefinition const*>)
{
error = 1686_error;
message = "Function with same name and arguments defined twice.";
message = "Function with same name and parameter types defined twice.";
}
else
{
static_assert(is_same_v<T, EventDefinition const*>, "Expected \"FunctionDefinition const*\" or \"EventDefinition const*\"");
error = 5883_error;
message = "Event with same name and arguments defined twice.";
message = "Event with same name and parameter types defined twice.";
}
ssl.limitSize(message);
+28 -4
View File
@@ -514,7 +514,13 @@ void OverrideChecker::checkOverride(OverrideProxy const& _overriding, OverridePr
);
if (!_overriding.overrides())
overrideError(_overriding, _super, 9456_error, "Overriding " + _overriding.astNodeName() + " is missing \"override\" specifier.");
overrideError(
_overriding,
_super,
9456_error,
"Overriding " + _overriding.astNodeName() + " is missing \"override\" specifier.",
"Overridden " + _overriding.astNodeName() + " is here:"
);
if (_super.isVariable())
overrideError(
@@ -536,7 +542,13 @@ void OverrideChecker::checkOverride(OverrideProxy const& _overriding, OverridePr
if (_overriding.isVariable())
{
if (_super.visibility() != Visibility::External)
overrideError(_overriding, _super, 5225_error, "Public state variables can only override functions with external visibility.");
overrideError(
_overriding,
_super,
5225_error,
"Public state variables can only override functions with external visibility.",
"Overridden function is here:"
);
solAssert(_overriding.visibility() == Visibility::External, "");
}
else if (_overriding.visibility() != _super.visibility())
@@ -547,7 +559,13 @@ void OverrideChecker::checkOverride(OverrideProxy const& _overriding, OverridePr
_super.visibility() == Visibility::External &&
_overriding.visibility() == Visibility::Public
))
overrideError(_overriding, _super, 9098_error, "Overriding " + _overriding.astNodeName() + " visibility differs.");
overrideError(
_overriding,
_super,
9098_error,
"Overriding " + _overriding.astNodeName() + " visibility differs.",
"Overridden " + _overriding.astNodeName() + " is here:"
);
}
if (_super.isFunction())
@@ -558,7 +576,13 @@ void OverrideChecker::checkOverride(OverrideProxy const& _overriding, OverridePr
solAssert(functionType->hasEqualParameterTypes(*superType), "Override doesn't have equal parameters!");
if (!functionType->hasEqualReturnTypes(*superType))
overrideError(_overriding, _super, 4822_error, "Overriding " + _overriding.astNodeName() + " return types differ.");
overrideError(
_overriding,
_super,
4822_error,
"Overriding " + _overriding.astNodeName() + " return types differ.",
"Overridden " + _overriding.astNodeName() + " is here:"
);
// This is only relevant for a function overriding a function.
if (_overriding.isFunction())
+1 -1
View File
@@ -146,7 +146,7 @@ void CompilerContext::callYulFunction(
m_externallyUsedYulFunctions.insert(_name);
auto const retTag = pushNewTag();
CompilerUtils(*this).moveIntoStack(_inArgs);
appendJumpTo(namedTag(_name));
appendJumpTo(namedTag(_name), evmasm::AssemblyItem::JumpType::IntoFunction);
adjustStackOffset(static_cast<int>(_outArgs) - 1 - static_cast<int>(_inArgs));
*this << retTag.tag();
}
+1 -1
View File
@@ -86,7 +86,7 @@ Json::Value Natspec::userDocumentation(ContractDefinition const& _contractDef)
}
}
for (auto const& event: _contractDef.events())
for (auto const& event: _contractDef.interfaceEvents())
{
string value = extractDoc(event->annotation().docTags, "notice");
if (!value.empty())