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

This commit is contained in:
chriseth
2020-12-14 11:33:40 +01:00
112 changed files with 950 additions and 226 deletions
+4
View File
@@ -34,6 +34,8 @@ using namespace std;
namespace solidity::frontend
{
namespace
{
/// Magic variables get negative ids for easy differentiation
int magicVariableToID(std::string const& _name)
{
@@ -103,6 +105,8 @@ inline vector<shared_ptr<MagicVariableDeclaration const>> constructMagicVariable
};
}
}
GlobalContext::GlobalContext(): m_magicVariables{constructMagicVariables()}
{
}
+4 -1
View File
@@ -2179,7 +2179,8 @@ void TypeChecker::typeCheckFunctionGeneralChecks(
for (size_t i = 0; i < paramArgMap.size(); ++i)
{
solAssert(!!paramArgMap[i], "unmapped parameter");
if (!type(*paramArgMap[i])->isImplicitlyConvertibleTo(*parameterTypes[i]))
BoolResult result = type(*paramArgMap[i])->isImplicitlyConvertibleTo(*parameterTypes[i]);
if (!result)
{
auto [errorId, description] = [&]() -> tuple<ErrorId, string> {
string msg =
@@ -2189,6 +2190,8 @@ void TypeChecker::typeCheckFunctionGeneralChecks(
" to " +
parameterTypes[i]->toString() +
" requested.";
if (!result.message().empty())
msg += " " + result.message();
if (
_functionType->kind() == FunctionType::Kind::BareCall ||
_functionType->kind() == FunctionType::Kind::BareCallCode ||