mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Make sure all errors/warnings terminate with ".", "?" or "!"
This commit is contained in:
parent
593e2515e7
commit
1eda206552
@ -42,6 +42,23 @@ std::string quoteSpace(std::string const& _name)
|
||||
|
||||
}
|
||||
|
||||
void checkMessage(string const _message)
|
||||
{
|
||||
if (
|
||||
_message.size() == 0 ||
|
||||
_message[_message.size()-1] == '.' ||
|
||||
_message[_message.size()-1] == '?' ||
|
||||
_message[_message.size()-1] == '!'
|
||||
)
|
||||
return;
|
||||
|
||||
solAssert(
|
||||
false,
|
||||
"Error/Warning not terminating with \".\", \"!\" or \"?\": " +
|
||||
_message
|
||||
);
|
||||
}
|
||||
|
||||
ErrorReporter& ErrorReporter::operator=(ErrorReporter const& _errorReporter)
|
||||
{
|
||||
if (&_errorReporter == this)
|
||||
@ -83,6 +100,8 @@ void ErrorReporter::error(Error::Type _type, SourceLocation const& _location, st
|
||||
errinfo_sourceLocation(_location) <<
|
||||
util::errinfo_comment(_description);
|
||||
|
||||
checkMessage(_description);
|
||||
|
||||
m_errorList.push_back(err);
|
||||
}
|
||||
|
||||
@ -97,6 +116,8 @@ void ErrorReporter::error(Error::Type _type, SourceLocation const& _location, Se
|
||||
errinfo_secondarySourceLocation(_secondaryLocation) <<
|
||||
util::errinfo_comment(_description);
|
||||
|
||||
checkMessage(_description);
|
||||
|
||||
m_errorList.push_back(err);
|
||||
}
|
||||
|
||||
|
@ -82,9 +82,9 @@ void ParserBase::expectToken(Token _value, bool _advance)
|
||||
{
|
||||
string const expectedToken = ParserBase::tokenName(_value);
|
||||
if (m_parserErrorRecovery)
|
||||
parserError("Expected " + expectedToken + " but got " + tokenName(tok));
|
||||
parserError("Expected " + expectedToken + " but got " + tokenName(tok) + ".");
|
||||
else
|
||||
fatalParserError("Expected " + expectedToken + " but got " + tokenName(tok));
|
||||
fatalParserError("Expected " + expectedToken + " but got " + tokenName(tok) + ".");
|
||||
// Do not advance so that recovery can sync or make use of the current token.
|
||||
// This is especially useful if the expected token
|
||||
// is the only one that is missing and is at the end of a construct.
|
||||
|
@ -384,7 +384,7 @@ void ContractLevelChecker::checkLibraryRequirements(ContractDefinition const& _c
|
||||
|
||||
for (auto const& var: _contract.stateVariables())
|
||||
if (!var->isConstant())
|
||||
m_errorReporter.typeError(var->location(), "Library cannot have non-constant state variables");
|
||||
m_errorReporter.typeError(var->location(), "Library cannot have non-constant state variables.");
|
||||
}
|
||||
|
||||
void ContractLevelChecker::checkBaseABICompatibility(ContractDefinition const& _contract)
|
||||
|
@ -254,7 +254,7 @@ void NameAndTypeResolver::warnVariablesNamedLikeInstructions()
|
||||
continue;
|
||||
m_errorReporter.warning(
|
||||
declaration->location(),
|
||||
"Variable is shadowed in inline assembly by an instruction of the same name"
|
||||
"Variable is shadowed in inline assembly by an instruction of the same name."
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -394,13 +394,13 @@ void NameAndTypeResolver::linearizeBaseContracts(ContractDefinition& _contract)
|
||||
input.back().push_front(base);
|
||||
vector<ContractDefinition const*> const& basesBases = base->annotation().linearizedBaseContracts;
|
||||
if (basesBases.empty())
|
||||
m_errorReporter.fatalTypeError(baseName.location(), "Definition of base has to precede definition of derived contract");
|
||||
m_errorReporter.fatalTypeError(baseName.location(), "Definition of base has to precede definition of derived contract.");
|
||||
input.push_front(list<ContractDefinition const*>(basesBases.begin(), basesBases.end()));
|
||||
}
|
||||
input.back().push_front(&_contract);
|
||||
vector<ContractDefinition const*> result = cThreeMerge(input);
|
||||
if (result.empty())
|
||||
m_errorReporter.fatalTypeError(_contract.location(), "Linearization of inheritance graph impossible");
|
||||
m_errorReporter.fatalTypeError(_contract.location(), "Linearization of inheritance graph impossible.");
|
||||
_contract.annotation().linearizedBaseContracts = result;
|
||||
_contract.annotation().contractDependencies.insert(result.begin() + 1, result.end());
|
||||
}
|
||||
|
@ -2162,7 +2162,7 @@ bool TypeChecker::visit(FunctionCall const& _functionCall)
|
||||
}
|
||||
|
||||
default:
|
||||
m_errorReporter.typeError(_functionCall.location(), "Type is not callable");
|
||||
m_errorReporter.typeError(_functionCall.location(), "Type is not callable.");
|
||||
funcCallAnno.kind = FunctionCallKind::Unset;
|
||||
funcCallAnno.isPure = argumentsArePure;
|
||||
break;
|
||||
@ -2750,7 +2750,7 @@ void TypeChecker::endVisit(Literal const& _literal)
|
||||
_literal.location(),
|
||||
msg +
|
||||
" If this is not used as an address, please prepend " + quote("00") + ". " +
|
||||
"For more information please see https://solidity.readthedocs.io/en/develop/types.html#address-literals"
|
||||
"Please see https://solidity.readthedocs.io/en/develop/types.html#address-literals for more information."
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -765,7 +765,8 @@ void BMC::checkCondition(
|
||||
case smt::CheckResult::SATISFIABLE:
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << _description << " happens here";
|
||||
message << _description << " happens here.";
|
||||
|
||||
if (callStack.size())
|
||||
{
|
||||
std::ostringstream modelMessage;
|
||||
@ -787,10 +788,8 @@ void BMC::checkCondition(
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
message << ".";
|
||||
m_errorReporter.warning(_location, message.str(), secondaryLocation);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case smt::CheckResult::UNSATISFIABLE:
|
||||
|
@ -70,6 +70,14 @@ Json::Value formatError(
|
||||
|
||||
Json::Value formatFatalError(string const& _type, string const& _message)
|
||||
{
|
||||
solAssert(_message.size() == 0 ||
|
||||
_message[_message.size() -1] == '.' ||
|
||||
_message[_message.size() -1] == '!' ||
|
||||
_message[_message.size() -1] == '?' ||
|
||||
_message[_message.size() -1] == '\n', // for libjsoncpp generated error messages
|
||||
"Expected message to end with \".\", \"?\" or \"!\""
|
||||
);
|
||||
|
||||
Json::Value output = Json::objectValue;
|
||||
output["errors"] = Json::arrayValue;
|
||||
output["errors"].append(formatError(false, _type, "general", _message));
|
||||
@ -322,11 +330,11 @@ Json::Value collectEVMObject(evmasm::LinkerObject const& _object, string const*
|
||||
std::optional<Json::Value> checkKeys(Json::Value const& _input, set<string> const& _keys, string const& _name)
|
||||
{
|
||||
if (!!_input && !_input.isObject())
|
||||
return formatFatalError("JSONError", quote(_name) + " must be an object");
|
||||
return formatFatalError("JSONError", quote(_name) + " must be an object.");
|
||||
|
||||
for (auto const& member: _input.getMemberNames())
|
||||
if (!_keys.count(member))
|
||||
return formatFatalError("JSONError", "Unknown key " + quote(member));
|
||||
return formatFatalError("JSONError", "Unknown key " + quote(member) + ".");
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
@ -372,7 +380,7 @@ std::optional<Json::Value> checkOptimizerDetail(Json::Value const& _details, std
|
||||
if (_details.isMember(_name))
|
||||
{
|
||||
if (!_details[_name].isBool())
|
||||
return formatFatalError("JSONError", quote("settings.optimizer.details." + _name) + " must be Boolean");
|
||||
return formatFatalError("JSONError", quote("settings.optimizer.details." + _name) + " must be Boolean.");
|
||||
_setting = _details[_name].asBool();
|
||||
}
|
||||
return {};
|
||||
@ -383,11 +391,11 @@ std::optional<Json::Value> checkMetadataKeys(Json::Value const& _input)
|
||||
if (_input.isObject())
|
||||
{
|
||||
if (_input.isMember("useLiteralContent") && !_input["useLiteralContent"].isBool())
|
||||
return formatFatalError("JSONError", quote("settings.metadata.useLiteralContent") + " must be Boolean");
|
||||
return formatFatalError("JSONError", quote("settings.metadata.useLiteralContent") + " must be Boolean.");
|
||||
|
||||
static set<string> hashes{"ipfs", "bzzr1", "none"};
|
||||
if (_input.isMember("bytecodeHash") && !hashes.count(_input["bytecodeHash"].asString()))
|
||||
return formatFatalError("JSONError", quote("settings.metadata.bytecodeHash") + " must be " + quoteSpace("ipfs") + "," + quoteSpace("bzzr1") + "or " + quote("none"));
|
||||
return formatFatalError("JSONError", quote("settings.metadata.bytecodeHash") + " must be " + quoteSpace("ipfs") + "," + quoteSpace("bzzr1") + "or " + quote("none") + ".");
|
||||
}
|
||||
static set<string> keys{"useLiteralContent", "bytecodeHash"};
|
||||
return checkKeys(_input, keys, "settings.metadata");
|
||||
@ -396,7 +404,7 @@ std::optional<Json::Value> checkMetadataKeys(Json::Value const& _input)
|
||||
std::optional<Json::Value> checkOutputSelection(Json::Value const& _outputSelection)
|
||||
{
|
||||
if (!!_outputSelection && !_outputSelection.isObject())
|
||||
return formatFatalError("JSONError", quote("settings.outputSelection") + " must be an object");
|
||||
return formatFatalError("JSONError", quote("settings.outputSelection") + " must be an object.");
|
||||
|
||||
for (auto const& sourceName: _outputSelection.getMemberNames())
|
||||
{
|
||||
@ -405,7 +413,7 @@ std::optional<Json::Value> checkOutputSelection(Json::Value const& _outputSelect
|
||||
if (!sourceVal.isObject())
|
||||
return formatFatalError(
|
||||
"JSONError",
|
||||
quote("settings.outputSelection." + sourceName) + " must be an object"
|
||||
quote("settings.outputSelection." + sourceName) + " must be an object."
|
||||
);
|
||||
|
||||
for (auto const& contractName: sourceVal.getMemberNames())
|
||||
@ -421,7 +429,7 @@ std::optional<Json::Value> checkOutputSelection(Json::Value const& _outputSelect
|
||||
"." +
|
||||
contractName
|
||||
) +
|
||||
" must be a string array"
|
||||
" must be a string array."
|
||||
);
|
||||
|
||||
for (auto const& output: contractVal)
|
||||
@ -434,7 +442,7 @@ std::optional<Json::Value> checkOutputSelection(Json::Value const& _outputSelect
|
||||
"." +
|
||||
contractName
|
||||
) +
|
||||
" must be a string array"
|
||||
" must be a string array."
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -680,11 +688,11 @@ boost::variant<StandardCompiler::InputsAndSettings, Json::Value> StandardCompile
|
||||
for (auto const& remapping: settings.get("remappings", Json::Value()))
|
||||
{
|
||||
if (!remapping.isString())
|
||||
return formatFatalError("JSONError", quote("settings.remappings") + " must be an array of strings");
|
||||
return formatFatalError("JSONError", quote("settings.remappings") + " must be an array of strings.");
|
||||
if (auto r = CompilerStack::parseRemapping(remapping.asString()))
|
||||
ret.remappings.emplace_back(std::move(*r));
|
||||
else
|
||||
return formatFatalError("JSONError", "Invalid remapping: " + quote(remapping.asString()));
|
||||
return formatFatalError("JSONError", "Invalid remapping: " + quote(remapping.asString()) + ".");
|
||||
}
|
||||
|
||||
if (settings.isMember("optimizer"))
|
||||
@ -1115,19 +1123,19 @@ Json::Value StandardCompiler::compile(Json::Value const& _input) noexcept
|
||||
}
|
||||
catch (Json::LogicError const& _exception)
|
||||
{
|
||||
return formatFatalError("InternalCompilerError", string("JSON logic exception: ") + _exception.what());
|
||||
return formatFatalError("InternalCompilerError", string("JSON logic exception: ") + _exception.what() + ".");
|
||||
}
|
||||
catch (Json::RuntimeError const& _exception)
|
||||
{
|
||||
return formatFatalError("InternalCompilerError", string("JSON runtime exception: ") + _exception.what());
|
||||
return formatFatalError("InternalCompilerError", string("JSON runtime exception: ") + _exception.what() + ".");
|
||||
}
|
||||
catch (util::Exception const& _exception)
|
||||
{
|
||||
return formatFatalError("InternalCompilerError", "Internal exception in StandardCompiler::compile: " + boost::diagnostic_information(_exception));
|
||||
return formatFatalError("InternalCompilerError", "Internal exception in StandardCompiler::compile: " + boost::diagnostic_information(_exception) + ".");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
return formatFatalError("InternalCompilerError", "Internal exception in StandardCompiler::compile");
|
||||
return formatFatalError("InternalCompilerError", "Internal exception in StandardCompiler::compile.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ DocStringParser::iter DocStringParser::parseDocTagParam(iter _pos, iter _end)
|
||||
auto nameStartPos = skipWhitespace(_pos, _end);
|
||||
if (nameStartPos == _end)
|
||||
{
|
||||
appendError("No param name given");
|
||||
appendError("No param name given.");
|
||||
return _end;
|
||||
}
|
||||
auto nameEndPos = firstNonIdentifier(nameStartPos, _end);
|
||||
|
@ -130,7 +130,7 @@ void Parser::parsePragmaVersion(SourceLocation const& _location, vector<Token> c
|
||||
_location,
|
||||
"Source file requires different compiler version (current compiler is " +
|
||||
string(VersionString) + " - note that nightly builds are considered to be "
|
||||
"strictly less than the released version"
|
||||
"strictly less than the released version."
|
||||
);
|
||||
}
|
||||
|
||||
@ -984,7 +984,7 @@ ASTPointer<TypeName> Parser::parseTypeName(bool _allowVar)
|
||||
else if (token == Token::Identifier)
|
||||
type = parseUserDefinedTypeName();
|
||||
else
|
||||
fatalParserError(string("Expected type name"));
|
||||
fatalParserError(string("Expected type name."));
|
||||
|
||||
if (type)
|
||||
// Parse "[...]" postfixes for arrays.
|
||||
@ -1015,7 +1015,7 @@ ASTPointer<Mapping> Parser::parseMapping()
|
||||
ASTPointer<ElementaryTypeName> keyType;
|
||||
Token token = m_scanner->currentToken();
|
||||
if (!TokenTraits::isElementaryTypeName(token))
|
||||
fatalParserError(string("Expected elementary type name for mapping key type"));
|
||||
fatalParserError(string("Expected elementary type name for mapping key type."));
|
||||
unsigned firstSize;
|
||||
unsigned secondSize;
|
||||
tie(firstSize, secondSize) = m_scanner->currentTokenInfo();
|
||||
|
@ -94,7 +94,7 @@ bool AsmAnalyzer::operator()(Literal const& _literal)
|
||||
{
|
||||
m_errorReporter.typeError(
|
||||
_literal.location,
|
||||
"String literal too long (" + to_string(_literal.value.str().size()) + " > 32)"
|
||||
"String literal too long (" + to_string(_literal.value.str().size()) + " > 32)."
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@ -102,7 +102,7 @@ bool AsmAnalyzer::operator()(Literal const& _literal)
|
||||
{
|
||||
m_errorReporter.typeError(
|
||||
_literal.location,
|
||||
"Number literal too large (> 256 bits)"
|
||||
"Number literal too large (> 256 bits)."
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@ -203,7 +203,7 @@ bool AsmAnalyzer::operator()(Assignment const& _assignment)
|
||||
to_string(expectedItems) +
|
||||
" vs. " +
|
||||
to_string(m_stackHeight - stackHeight) +
|
||||
")"
|
||||
")."
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"A:1:58: ParserError: Expected type name
|
||||
{"errors":[{"component":"general","formattedMessage":"A:1:58: ParserError: Expected type name.
|
||||
pragma solidity >=0.0; contract Errort6 { using foo for ; /* missing type name */ }
|
||||
^
|
||||
","message":"Expected type name","severity":"error","sourceLocation":{"end":58,"file":"A","start":57},"type":"ParserError"},{"component":"general","formattedMessage":"A:1:84: Warning: Recovered in ContractDefinition at \"}\".
|
||||
","message":"Expected type name.","severity":"error","sourceLocation":{"end":58,"file":"A","start":57},"type":"ParserError"},{"component":"general","formattedMessage":"A:1:84: Warning: Recovered in ContractDefinition at \"}\".
|
||||
pragma solidity >=0.0; contract Errort6 { using foo for ; /* missing type name */ }
|
||||
^
|
||||
","message":"Recovered in ContractDefinition at \"}\".","severity":"warning","sourceLocation":{"end":84,"file":"A","start":83},"type":"Warning"}],"sources":{"A":{"ast":{"absolutePath":"A","exportedSymbols":{"Errort6":[3]},"id":4,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"0:22:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":3,"linearizedBaseContracts":[3],"name":"Errort6","nodeType":"ContractDefinition","nodes":[],"scope":4,"src":"23:35:0"}],"src":"0:84:0"},"id":0}}}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.optimizer.details.peephole\" must be Boolean","message":"\"settings.optimizer.details.peephole\" must be Boolean","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.optimizer.details.peephole\" must be Boolean.","message":"\"settings.optimizer.details.peephole\" must be Boolean.","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"Unknown key \"notThere\"","message":"Unknown key \"notThere\"","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"Unknown key \"notThere\".","message":"Unknown key \"notThere\".","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.optimizer.details.yulDetails\" must be an object","message":"\"settings.optimizer.details.yulDetails\" must be an object","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.optimizer.details.yulDetails\" must be an object.","message":"\"settings.optimizer.details.yulDetails\" must be an object.","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\"","message":"Unknown key \"key1\"","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\".","message":"Unknown key \"key1\".","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\"","message":"Unknown key \"key1\"","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\".","message":"Unknown key \"key1\".","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\"","message":"Unknown key \"key1\"","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\".","message":"Unknown key \"key1\".","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\"","message":"Unknown key \"key1\"","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\".","message":"Unknown key \"key1\".","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\"","message":"Unknown key \"key1\"","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\".","message":"Unknown key \"key1\".","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\"","message":"Unknown key \"key1\"","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\".","message":"Unknown key \"key1\".","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"\"auxiliaryInput\" must be an object","message":"\"auxiliaryInput\" must be an object","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"\"auxiliaryInput\" must be an object.","message":"\"auxiliaryInput\" must be an object.","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.metadata\" must be an object","message":"\"settings.metadata\" must be an object","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.metadata\" must be an object.","message":"\"settings.metadata\" must be an object.","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.optimizer\" must be an object","message":"\"settings.optimizer\" must be an object","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.optimizer\" must be an object.","message":"\"settings.optimizer\" must be an object.","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.outputSelection\" must be an object","message":"\"settings.outputSelection\" must be an object","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.outputSelection\" must be an object.","message":"\"settings.outputSelection\" must be an object.","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.outputSelection.fileA.A\" must be a string array","message":"\"settings.outputSelection.fileA.A\" must be a string array","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.outputSelection.fileA.A\" must be a string array.","message":"\"settings.outputSelection.fileA.A\" must be a string array.","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.outputSelection.fileA\" must be an object","message":"\"settings.outputSelection.fileA\" must be an object","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.outputSelection.fileA\" must be an object.","message":"\"settings.outputSelection.fileA\" must be an object.","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.outputSelection.fileA.A\" must be a string array","message":"\"settings.outputSelection.fileA.A\" must be a string array","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.outputSelection.fileA.A\" must be a string array.","message":"\"settings.outputSelection.fileA.A\" must be a string array.","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.remappings\" must be an array of strings","message":"\"settings.remappings\" must be an array of strings","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.remappings\" must be an array of strings.","message":"\"settings.remappings\" must be an array of strings.","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings\" must be an object","message":"\"settings\" must be an object","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings\" must be an object.","message":"\"settings\" must be an object.","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"\"sources.A\" must be an object","message":"\"sources.A\" must be an object","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"\"sources.A\" must be an object.","message":"\"sources.A\" must be an object.","severity":"error","type":"JSONError"}]}
|
||||
|
@ -1 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.metadata.useLiteralContent\" must be Boolean","message":"\"settings.metadata.useLiteralContent\" must be Boolean","severity":"error","type":"JSONError"}]}
|
||||
{"errors":[{"component":"general","formattedMessage":"\"settings.metadata.useLiteralContent\" must be Boolean.","message":"\"settings.metadata.useLiteralContent\" must be Boolean.","severity":"error","type":"JSONError"}]}
|
||||
|
@ -287,7 +287,7 @@ BOOST_AUTO_TEST_CASE(if_statement_invalid)
|
||||
CHECK_PARSE_ERROR("{ if mload {} }", ParserError, "Expected" + quoteSpace("(") + "but got " + quote("{"));
|
||||
BOOST_CHECK("{ if calldatasize() {}");
|
||||
CHECK_PARSE_ERROR("{ if mstore(1, 1) {} }", TypeError, "Expected expression to return one item to the stack, but it returned 0 items.");
|
||||
CHECK_PARSE_ERROR("{ if 32 let x := 3 }", ParserError, "Expected" + quoteSpace("{") + "but got reserved keyword " + quote("let"));
|
||||
CHECK_PARSE_ERROR("{ if 32 let x := 3 }", ParserError, "Expected" + quoteSpace("{") + "but got reserved keyword " + quote("let") + ".");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(switch_statement)
|
||||
@ -314,7 +314,7 @@ BOOST_AUTO_TEST_CASE(switch_duplicate_case)
|
||||
BOOST_AUTO_TEST_CASE(switch_invalid_expression)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ switch {} default {} }", ParserError, "Literal, identifier or instruction expected.");
|
||||
CHECK_PARSE_ERROR("{ switch mload default {} }", ParserError, "Expected" + quoteSpace("(") + "but got reserved keyword " + quote("default"));
|
||||
CHECK_PARSE_ERROR("{ switch mload default {} }", ParserError, "Expected" + quoteSpace("(") + "but got reserved keyword " + quote("default") + ".");
|
||||
CHECK_PARSE_ERROR("{ switch mstore(1, 1) default {} }", TypeError, "Expected expression to return one item to the stack, but it returned 0 items.");
|
||||
}
|
||||
|
||||
@ -347,9 +347,9 @@ BOOST_AUTO_TEST_CASE(for_statement)
|
||||
BOOST_AUTO_TEST_CASE(for_invalid_expression)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ for {} {} {} {} }", ParserError, "Literal, identifier or instruction expected.");
|
||||
CHECK_PARSE_ERROR("{ for 1 1 {} {} }", ParserError, "Expected" + quoteSpace("{") + "but got " + quote("Number"));
|
||||
CHECK_PARSE_ERROR("{ for {} 1 1 {} }", ParserError, "Expected" + quoteSpace("{") + "but got " + quote("Number"));
|
||||
CHECK_PARSE_ERROR("{ for {} 1 {} 1 }", ParserError, "Expected" + quoteSpace("{") + "but got " + quote("Number"));
|
||||
CHECK_PARSE_ERROR("{ for 1 1 {} {} }", ParserError, "Expected" + quoteSpace("{") + "but got " + quote("Number") + ".");
|
||||
CHECK_PARSE_ERROR("{ for {} 1 1 {} }", ParserError, "Expected" + quoteSpace("{") + "but got " + quote("Number") + ".");
|
||||
CHECK_PARSE_ERROR("{ for {} 1 {} 1 }", ParserError, "Expected" + quoteSpace("{") + "but got " + quote("Number") + ".");
|
||||
CHECK_PARSE_ERROR("{ for {} mload {} {} }", ParserError, "Expected" + quoteSpace("(") + "but got " + quote("{"));
|
||||
CHECK_PARSE_ERROR("{ for {} mstore(1, 1) {} {} }", TypeError, "Expected expression to return one item to the stack, but it returned 0 items.");
|
||||
}
|
||||
@ -357,18 +357,18 @@ BOOST_AUTO_TEST_CASE(for_invalid_expression)
|
||||
BOOST_AUTO_TEST_CASE(for_visibility)
|
||||
{
|
||||
BOOST_CHECK(successParse("{ for { let i := 1 } i { pop(i) } { pop(i) } }"));
|
||||
CHECK_PARSE_ERROR("{ for {} i { let i := 1 } {} }", DeclarationError, "Identifier not found");
|
||||
CHECK_PARSE_ERROR("{ for {} 1 { let i := 1 } { pop(i) } }", DeclarationError, "Identifier not found");
|
||||
CHECK_PARSE_ERROR("{ for {} 1 { pop(i) } { let i := 1 } }", DeclarationError, "Identifier not found");
|
||||
CHECK_PARSE_ERROR("{ for { pop(i) } 1 { let i := 1 } {} }", DeclarationError, "Identifier not found");
|
||||
CHECK_PARSE_ERROR("{ for { pop(i) } 1 { } { let i := 1 } }", DeclarationError, "Identifier not found");
|
||||
CHECK_PARSE_ERROR("{ for {} i {} { let i := 1 } }", DeclarationError, "Identifier not found");
|
||||
CHECK_PARSE_ERROR("{ for {} 1 { pop(i) } { let i := 1 } }", DeclarationError, "Identifier not found");
|
||||
CHECK_PARSE_ERROR("{ for { let x := 1 } 1 { let x := 1 } {} }", DeclarationError, "Variable name" + quoteSpace("x") + "already taken in this scope");
|
||||
CHECK_PARSE_ERROR("{ for { let x := 1 } 1 {} { let x := 1 } }", DeclarationError, "Variable name" + quoteSpace("x") + "already taken in this scope");
|
||||
CHECK_PARSE_ERROR("{ let x := 1 for { let x := 1 } 1 {} {} }", DeclarationError, "Variable name" + quoteSpace("x") + "already taken in this scope");
|
||||
CHECK_PARSE_ERROR("{ let x := 1 for {} 1 { let x := 1 } {} }", DeclarationError, "Variable name" + quoteSpace("x") + "already taken in this scope");
|
||||
CHECK_PARSE_ERROR("{ let x := 1 for {} 1 {} { let x := 1 } }", DeclarationError, "Variable name" + quoteSpace("x") + "already taken in this scope");
|
||||
CHECK_PARSE_ERROR("{ for {} i { let i := 1 } {} }", DeclarationError, "Identifier not found.");
|
||||
CHECK_PARSE_ERROR("{ for {} 1 { let i := 1 } { pop(i) } }", DeclarationError, "Identifier not found.");
|
||||
CHECK_PARSE_ERROR("{ for {} 1 { pop(i) } { let i := 1 } }", DeclarationError, "Identifier not found.");
|
||||
CHECK_PARSE_ERROR("{ for { pop(i) } 1 { let i := 1 } {} }", DeclarationError, "Identifier not found.");
|
||||
CHECK_PARSE_ERROR("{ for { pop(i) } 1 { } { let i := 1 } }", DeclarationError, "Identifier not found.");
|
||||
CHECK_PARSE_ERROR("{ for {} i {} { let i := 1 } }", DeclarationError, "Identifier not found.");
|
||||
CHECK_PARSE_ERROR("{ for {} 1 { pop(i) } { let i := 1 } }", DeclarationError, "Identifier not found.");
|
||||
CHECK_PARSE_ERROR("{ for { let x := 1 } 1 { let x := 1 } {} }", DeclarationError, "Variable name" + quoteSpace("x") + "already taken in this scope.");
|
||||
CHECK_PARSE_ERROR("{ for { let x := 1 } 1 {} { let x := 1 } }", DeclarationError, "Variable name" + quoteSpace("x") + "already taken in this scope.");
|
||||
CHECK_PARSE_ERROR("{ let x := 1 for { let x := 1 } 1 {} {} }", DeclarationError, "Variable name" + quoteSpace("x") + "already taken in this scope.");
|
||||
CHECK_PARSE_ERROR("{ let x := 1 for {} 1 { let x := 1 } {} }", DeclarationError, "Variable name" + quoteSpace("x") + "already taken in this scope.");
|
||||
CHECK_PARSE_ERROR("{ let x := 1 for {} 1 {} { let x := 1 } }", DeclarationError, "Variable name" + quoteSpace("x") + "already taken in this scope.");
|
||||
// Check that body and post are not sub-scopes of each other.
|
||||
BOOST_CHECK(successParse("{ for {} 1 { let x := 1 } { let x := 1 } }"));
|
||||
}
|
||||
@ -384,7 +384,7 @@ BOOST_AUTO_TEST_CASE(number_literals)
|
||||
CHECK_PARSE_ERROR("{ let x := .1 }", ParserError, "Invalid number literal.");
|
||||
CHECK_PARSE_ERROR("{ let x := 1e5 }", ParserError, "Invalid number literal.");
|
||||
CHECK_PARSE_ERROR("{ let x := 67.235 }", ParserError, "Invalid number literal.");
|
||||
CHECK_STRICT_ERROR("{ let x := 0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff }", TypeError, "Number literal too large (> 256 bits)");
|
||||
CHECK_STRICT_ERROR("{ let x := 0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff }", TypeError, "Number literal too large (> 256 bits).");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(function_definitions)
|
||||
@ -415,27 +415,27 @@ BOOST_AUTO_TEST_CASE(opcode_for_function_args)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(name_clashes)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ let g := 2 function g() { } }", DeclarationError, "Variable name" + quoteSpace("g") + "already taken in this scope");
|
||||
CHECK_PARSE_ERROR("{ let g := 2 function g() { } }", DeclarationError, "Variable name" + quoteSpace("g") + "already taken in this scope.");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(name_clashes_function_subscope)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ function g() { function g() {} } }", DeclarationError, "Function name" + quoteSpace("g") + "already taken in this scope");
|
||||
CHECK_PARSE_ERROR("{ function g() { function g() {} } }", DeclarationError, "Function name" + quoteSpace("g") + "already taken in this scope.");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(name_clashes_function_subscope_reverse)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ { function g() {} } function g() { } }", DeclarationError, "Function name" + quoteSpace("g") + "already taken in this scope");
|
||||
CHECK_PARSE_ERROR("{ { function g() {} } function g() { } }", DeclarationError, "Function name" + quoteSpace("g") + "already taken in this scope.");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(name_clashes_function_variable_subscope)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ function g() { let g := 0 } }", DeclarationError, "Variable name" + quoteSpace("g") + "already taken in this scope");
|
||||
CHECK_PARSE_ERROR("{ function g() { let g := 0 } }", DeclarationError, "Variable name" + quoteSpace("g") + "already taken in this scope.");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(name_clashes_function_variable_subscope_reverse)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ { let g := 0 } function g() { } }", DeclarationError, "Variable name" + quoteSpace("g") + "already taken in this scope");
|
||||
CHECK_PARSE_ERROR("{ { let g := 0 } function g() { } }", DeclarationError, "Variable name" + quoteSpace("g") + "already taken in this scope.");
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE(functions_in_parallel_scopes)
|
||||
{
|
||||
@ -449,7 +449,7 @@ BOOST_AUTO_TEST_CASE(variable_access_cross_functions)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(invalid_tuple_assignment)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ let x, y := 1 }", DeclarationError, "Variable count mismatch: 2 variables and 1 values");
|
||||
CHECK_PARSE_ERROR("{ let x, y := 1 }", DeclarationError, "Variable count mismatch: 2 variables and 1 values.");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(instruction_too_few_arguments)
|
||||
@ -460,7 +460,7 @@ BOOST_AUTO_TEST_CASE(instruction_too_few_arguments)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(instruction_too_many_arguments)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ pop(mul(1, 2, 3)) }", TypeError, "Function expects 2 arguments but got 3");
|
||||
CHECK_PARSE_ERROR("{ pop(mul(1, 2, 3)) }", TypeError, "Function expects 2 arguments but got 3.");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(recursion_depth)
|
||||
@ -599,8 +599,8 @@ BOOST_AUTO_TEST_CASE(oversize_string_literals)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(magic_variables)
|
||||
{
|
||||
CHECK_ASSEMBLE_ERROR("{ pop(this) }", DeclarationError, "Identifier not found");
|
||||
CHECK_ASSEMBLE_ERROR("{ pop(ecrecover) }", DeclarationError, "Identifier not found");
|
||||
CHECK_ASSEMBLE_ERROR("{ pop(this) }", DeclarationError, "Identifier not found.");
|
||||
CHECK_ASSEMBLE_ERROR("{ pop(ecrecover) }", DeclarationError, "Identifier not found.");
|
||||
BOOST_CHECK(successAssemble("{ let ecrecover := 1 pop(ecrecover) }"));
|
||||
}
|
||||
|
||||
|
@ -384,7 +384,7 @@ BOOST_AUTO_TEST_CASE(returndatasize_as_variable)
|
||||
contract C { function f() public pure { uint returndatasize; returndatasize; assembly { pop(returndatasize()) }}}
|
||||
)";
|
||||
vector<pair<Error::Type, std::string>> expectations(vector<pair<Error::Type, std::string>>{
|
||||
{Error::Type::Warning, "Variable is shadowed in inline assembly by an instruction of the same name"}
|
||||
{Error::Type::Warning, "Variable is shadowed in inline assembly by an instruction of the same name."}
|
||||
});
|
||||
if (!solidity::test::Options::get().evmVersion().supportsReturndata())
|
||||
expectations.emplace_back(make_pair(Error::Type::TypeError, quote("returndatasize") + " instruction is only available for Byzantium-compatible VMs"));
|
||||
@ -414,7 +414,7 @@ BOOST_AUTO_TEST_CASE(extcodehash_as_variable)
|
||||
// This needs special treatment, because the message mentions the EVM version,
|
||||
// so cannot be run via isoltest.
|
||||
vector<pair<Error::Type, std::string>> expectations(vector<pair<Error::Type, std::string>>{
|
||||
{Error::Type::Warning, "Variable is shadowed in inline assembly by an instruction of the same name"}
|
||||
{Error::Type::Warning, "Variable is shadowed in inline assembly by an instruction of the same name."}
|
||||
});
|
||||
if (!solidity::test::Options::get().evmVersion().hasExtCodeHash())
|
||||
expectations.emplace_back(make_pair(Error::Type::TypeError, quote("extcodehash") + " instruction is only available for Constantinople-compatible VMs"));
|
||||
|
@ -463,8 +463,8 @@ BOOST_AUTO_TEST_CASE(compilation_error)
|
||||
{
|
||||
BOOST_CHECK_EQUAL(
|
||||
util::jsonCompactPrint(error),
|
||||
"{\"component\":\"general\",\"formattedMessage\":\"fileA:1:23: ParserError: Expected identifier but got \\\"}\\\"\\n"
|
||||
"contract A { function }\\n ^\\n\",\"message\":\"Expected identifier but got \\\"}\\\"\","
|
||||
"{\"component\":\"general\",\"formattedMessage\":\"fileA:1:23: ParserError: Expected identifier but got \\\"}\\\".\\n"
|
||||
"contract A { function }\\n ^\\n\",\"message\":\"Expected identifier but got \\\"}\\\".\","
|
||||
"\"severity\":\"error\",\"sourceLocation\":{\"end\":23,\"file\":\"fileA\",\"start\":22},\"type\":\"ParserError\"}"
|
||||
);
|
||||
}
|
||||
|
@ -3,5 +3,5 @@ contract Errort6 {
|
||||
}
|
||||
|
||||
// ----
|
||||
// ParserError: (36-37): Expected type name
|
||||
// ParserError: (36-37): Expected type name.
|
||||
// Warning: (59-60): Recovered in ContractDefinition at "}".
|
||||
|
@ -10,4 +10,4 @@ contract Error2 {
|
||||
mapping (address => uint balances; // missing ) before "balances"
|
||||
}
|
||||
// ----
|
||||
// ParserError: (417-425): Expected ")" but got identifier
|
||||
// ParserError: (417-425): Expected ")" but got identifier.
|
||||
|
@ -17,7 +17,7 @@ contract SendCoin {
|
||||
}
|
||||
|
||||
// ----
|
||||
// ParserError: (212-220): Expected ")" but got identifier
|
||||
// ParserError: (220-221): Expected ";" but got ")"
|
||||
// ParserError: (212-220): Expected ")" but got identifier.
|
||||
// ParserError: (220-221): Expected ";" but got ")".
|
||||
// ParserError: (220-221): Function, variable, struct or modifier declaration expected.
|
||||
// Warning: (235-236): Recovered in ContractDefinition at "}".
|
||||
|
@ -21,9 +21,9 @@ contract Error4 {
|
||||
|
||||
}
|
||||
// ----
|
||||
// ParserError: (249-250): Expected ";" but got "Number"
|
||||
// ParserError: (471-479): Expected ";" but got identifier
|
||||
// ParserError: (529-533): Expected ";" but got "emit"
|
||||
// ParserError: (577-583): Expected "," but got "return"
|
||||
// ParserError: (249-250): Expected ";" but got "Number".
|
||||
// ParserError: (471-479): Expected ";" but got identifier.
|
||||
// ParserError: (529-533): Expected ";" but got "emit".
|
||||
// ParserError: (577-583): Expected "," but got "return".
|
||||
// ParserError: (577-583): Expected primary expression.
|
||||
// Warning: (588-589): Recovered in Statement at ";".
|
||||
|
@ -15,4 +15,4 @@ contract c {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
|
@ -15,5 +15,5 @@ contract c {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (227-236): Assertion violation happens here
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (227-236): Assertion violation happens here.
|
||||
|
@ -24,5 +24,5 @@ contract c {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (362-372): Assertion violation happens here
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (362-372): Assertion violation happens here.
|
||||
|
@ -15,4 +15,4 @@ contract c {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
|
@ -15,5 +15,5 @@ contract c {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (225-235): Assertion violation happens here
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (225-235): Assertion violation happens here.
|
||||
|
@ -15,4 +15,4 @@ contract c {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
|
@ -15,5 +15,5 @@ contract c {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (225-235): Assertion violation happens here
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (225-235): Assertion violation happens here.
|
||||
|
@ -24,5 +24,5 @@ contract c {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (360-370): Assertion violation happens here
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (360-370): Assertion violation happens here.
|
||||
|
@ -15,4 +15,4 @@ contract c {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
|
@ -15,5 +15,5 @@ contract c {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (225-235): Assertion violation happens here
|
||||
// Warning: (101-106): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (225-235): Assertion violation happens here.
|
||||
|
@ -9,4 +9,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (159-173): Assertion violation happens here
|
||||
// Warning: (159-173): Assertion violation happens here.
|
||||
|
@ -9,4 +9,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (159-173): Assertion violation happens here
|
||||
// Warning: (159-173): Assertion violation happens here.
|
||||
|
@ -9,4 +9,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (161-175): Assertion violation happens here
|
||||
// Warning: (161-175): Assertion violation happens here.
|
||||
|
@ -13,4 +13,4 @@ contract A is C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (166-180): Assertion violation happens here
|
||||
// Warning: (166-180): Assertion violation happens here.
|
||||
|
@ -4,4 +4,4 @@ contract A is C { constructor() C(2) public { assert(a == 2); } }
|
||||
contract B is C { constructor() C(3) public { assert(a == 3); } }
|
||||
contract J is C { constructor() C(3) public { assert(a == 4); } }
|
||||
// ----
|
||||
// Warning: (271-285): Assertion violation happens here
|
||||
// Warning: (271-285): Assertion violation happens here.
|
||||
|
@ -19,4 +19,4 @@ contract A is B {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (253-271): Assertion violation happens here
|
||||
// Warning: (253-271): Assertion violation happens here.
|
||||
|
@ -18,6 +18,6 @@ contract A is B {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (221-226): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (212-217): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (251-256): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (221-226): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (212-217): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (251-256): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
|
@ -25,5 +25,5 @@ contract A is B2, B1 {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (214-219): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (330-348): Assertion violation happens here
|
||||
// Warning: (214-219): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (330-348): Assertion violation happens here.
|
||||
|
@ -25,5 +25,5 @@ contract A is B2, B1 {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (214-219): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (330-348): Assertion violation happens here
|
||||
// Warning: (214-219): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (330-348): Assertion violation happens here.
|
||||
|
@ -27,8 +27,8 @@ contract A is B2, B1 {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (174-179): Underflow (resulting value less than 0) happens here
|
||||
// Warning: (174-179): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (239-244): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (262-267): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (362-378): Assertion violation happens here
|
||||
// Warning: (174-179): Underflow (resulting value less than 0) happens here.
|
||||
// Warning: (174-179): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (239-244): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (262-267): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (362-378): Assertion violation happens here.
|
||||
|
@ -20,4 +20,4 @@ contract A is B, B2 {
|
||||
}
|
||||
// ----
|
||||
// Warning: (171-177): Unused function parameter. Remove or comment out the variable name to silence this warning.
|
||||
// Warning: (208-222): Assertion violation happens here
|
||||
// Warning: (208-222): Assertion violation happens here.
|
||||
|
@ -19,4 +19,4 @@ contract A is B {
|
||||
}
|
||||
// ----
|
||||
// Warning: (201-207): Unused function parameter. Remove or comment out the variable name to silence this warning.
|
||||
// Warning: (238-252): Assertion violation happens here
|
||||
// Warning: (238-252): Assertion violation happens here.
|
||||
|
@ -17,4 +17,4 @@ contract A is B {
|
||||
}
|
||||
// ----
|
||||
// Warning: (145-151): Unused function parameter. Remove or comment out the variable name to silence this warning.
|
||||
// Warning: (186-200): Assertion violation happens here
|
||||
// Warning: (186-200): Assertion violation happens here.
|
||||
|
@ -16,4 +16,4 @@ contract A is B {
|
||||
}
|
||||
// ----
|
||||
// Warning: (145-151): Unused function parameter. Remove or comment out the variable name to silence this warning.
|
||||
// Warning: (164-178): Assertion violation happens here
|
||||
// Warning: (164-178): Assertion violation happens here.
|
||||
|
@ -27,4 +27,4 @@ contract A is B {
|
||||
}
|
||||
// ----
|
||||
// Warning: (275-281): Unused function parameter. Remove or comment out the variable name to silence this warning.
|
||||
// Warning: (312-326): Assertion violation happens here
|
||||
// Warning: (312-326): Assertion violation happens here.
|
||||
|
@ -32,4 +32,4 @@ contract A is B {
|
||||
}
|
||||
// ----
|
||||
// Warning: (317-323): Unused function parameter. Remove or comment out the variable name to silence this warning.
|
||||
// Warning: (385-400): Assertion violation happens here
|
||||
// Warning: (385-400): Assertion violation happens here.
|
||||
|
@ -25,5 +25,5 @@ contract A is B {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (261-266): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (356-370): Assertion violation happens here
|
||||
// Warning: (261-266): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (356-370): Assertion violation happens here.
|
||||
|
@ -23,5 +23,5 @@ contract B is C {
|
||||
contract A is B {
|
||||
}
|
||||
// ----
|
||||
// Warning: (287-301): Assertion violation happens here
|
||||
// Warning: (287-301): Assertion violation happens here
|
||||
// Warning: (287-301): Assertion violation happens here.
|
||||
// Warning: (287-301): Assertion violation happens here.
|
||||
|
@ -14,4 +14,4 @@ contract A is C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (202-216): Assertion violation happens here
|
||||
// Warning: (202-216): Assertion violation happens here.
|
||||
|
@ -13,4 +13,4 @@ contract A is C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (148-162): Assertion violation happens here
|
||||
// Warning: (148-162): Assertion violation happens here.
|
||||
|
@ -13,4 +13,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (148-162): Assertion violation happens here
|
||||
// Warning: (148-162): Assertion violation happens here.
|
||||
|
@ -13,4 +13,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (152-166): Assertion violation happens here
|
||||
// Warning: (152-166): Assertion violation happens here.
|
||||
|
@ -15,4 +15,4 @@ contract C is B {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (172-186): Assertion violation happens here
|
||||
// Warning: (172-186): Assertion violation happens here.
|
||||
|
@ -13,5 +13,5 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (169-183): Assertion violation happens here
|
||||
// Warning: (122-127): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (169-183): Assertion violation happens here.
|
||||
// Warning: (122-127): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
|
@ -9,5 +9,5 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (116-132): Assertion violation happens here
|
||||
// Warning: (116-132): Assertion violation happens here
|
||||
// Warning: (116-132): Assertion violation happens here.
|
||||
// Warning: (116-132): Assertion violation happens here.
|
||||
|
@ -36,6 +36,6 @@ contract C
|
||||
// ----
|
||||
// Warning: (271-274): Assertion checker does not support recursive function calls.
|
||||
// Warning: (140-143): Assertion checker does not support recursive function calls.
|
||||
// Warning: (483-497): Assertion violation happens here
|
||||
// Warning: (483-497): Assertion violation happens here.
|
||||
// Warning: (201-204): Assertion checker does not support recursive function calls.
|
||||
// Warning: (483-497): Assertion violation happens here
|
||||
// Warning: (483-497): Assertion violation happens here.
|
||||
|
@ -16,4 +16,4 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (209-223): Assertion violation happens here
|
||||
// Warning: (209-223): Assertion violation happens here.
|
||||
|
@ -24,5 +24,5 @@ contract C
|
||||
|
||||
}
|
||||
// ----
|
||||
// Warning: (209-223): Assertion violation happens here
|
||||
// Warning: (321-335): Assertion violation happens here
|
||||
// Warning: (209-223): Assertion violation happens here.
|
||||
// Warning: (321-335): Assertion violation happens here.
|
||||
|
@ -18,4 +18,4 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (261-277): Assertion violation happens here
|
||||
// Warning: (261-277): Assertion violation happens here.
|
||||
|
@ -17,4 +17,4 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (257-271): Assertion violation happens here
|
||||
// Warning: (257-271): Assertion violation happens here.
|
||||
|
@ -17,4 +17,4 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (297-321): Assertion violation happens here
|
||||
// Warning: (297-321): Assertion violation happens here.
|
||||
|
@ -18,4 +18,4 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (355-379): Assertion violation happens here
|
||||
// Warning: (355-379): Assertion violation happens here.
|
||||
|
@ -16,4 +16,4 @@ contract D
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (191-206): Assertion violation happens here
|
||||
// Warning: (191-206): Assertion violation happens here.
|
||||
|
@ -12,4 +12,4 @@ contract C
|
||||
}
|
||||
|
||||
// ----
|
||||
// Warning: (161-174): Assertion violation happens here
|
||||
// Warning: (161-174): Assertion violation happens here.
|
||||
|
@ -16,4 +16,4 @@ contract C
|
||||
}
|
||||
|
||||
// ----
|
||||
// Warning: (229-242): Assertion violation happens here
|
||||
// Warning: (229-242): Assertion violation happens here.
|
||||
|
@ -12,4 +12,4 @@ contract C
|
||||
}
|
||||
|
||||
// ----
|
||||
// Warning: (163-176): Assertion violation happens here
|
||||
// Warning: (163-176): Assertion violation happens here.
|
||||
|
@ -18,4 +18,4 @@ contract C
|
||||
}
|
||||
// ----
|
||||
// Warning: (228-229): Assertion checker does not yet implement type "type(library L)".
|
||||
// Warning: (245-261): Assertion violation happens here
|
||||
// Warning: (245-261): Assertion violation happens here.
|
||||
|
@ -13,4 +13,4 @@ contract C
|
||||
}
|
||||
|
||||
// ----
|
||||
// Warning: (144-157): Assertion violation happens here
|
||||
// Warning: (144-157): Assertion violation happens here.
|
||||
|
@ -14,4 +14,4 @@ contract C
|
||||
}
|
||||
|
||||
// ----
|
||||
// Warning: (152-165): Assertion violation happens here
|
||||
// Warning: (152-165): Assertion violation happens here.
|
||||
|
@ -21,4 +21,4 @@ contract C
|
||||
}
|
||||
// ----
|
||||
// Warning: (160-166): This declaration shadows a builtin symbol.
|
||||
// Warning: (268-282): Assertion violation happens here
|
||||
// Warning: (268-282): Assertion violation happens here.
|
||||
|
@ -25,5 +25,5 @@ contract A is B {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (261-266): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (356-370): Assertion violation happens here
|
||||
// Warning: (261-266): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (356-370): Assertion violation happens here.
|
||||
|
@ -8,4 +8,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (104-118): Assertion violation happens here
|
||||
// Warning: (104-118): Assertion violation happens here.
|
||||
|
@ -11,4 +11,4 @@ contract D is C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (124-138): Assertion violation happens here
|
||||
// Warning: (124-138): Assertion violation happens here.
|
||||
|
@ -19,4 +19,4 @@ contract D is C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (232-246): Assertion violation happens here
|
||||
// Warning: (232-246): Assertion violation happens here.
|
||||
|
@ -18,4 +18,4 @@ contract D is C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (199-213): Assertion violation happens here
|
||||
// Warning: (199-213): Assertion violation happens here.
|
||||
|
@ -22,6 +22,6 @@ contract A is B {
|
||||
}
|
||||
|
||||
// ----
|
||||
// Warning: (171-176): Underflow (resulting value less than 0) happens here
|
||||
// Warning: (171-176): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (296-314): Assertion violation happens here
|
||||
// Warning: (171-176): Underflow (resulting value less than 0) happens here.
|
||||
// Warning: (171-176): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (296-314): Assertion violation happens here.
|
||||
|
@ -22,5 +22,5 @@ contract A is B {
|
||||
}
|
||||
|
||||
// ----
|
||||
// Warning: (171-177): Overflow (resulting value larger than 2**256 - 1) happens here
|
||||
// Warning: (294-312): Assertion violation happens here
|
||||
// Warning: (171-177): Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning: (294-312): Assertion violation happens here.
|
||||
|
@ -17,4 +17,4 @@ contract D is B, C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (169-183): Assertion violation happens here
|
||||
// Warning: (169-183): Assertion violation happens here.
|
||||
|
@ -19,4 +19,4 @@ contract D is B, C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (235-249): Assertion violation happens here
|
||||
// Warning: (235-249): Assertion violation happens here.
|
||||
|
@ -13,5 +13,5 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (162-175): Assertion violation happens here
|
||||
// Warning: (179-193): Assertion violation happens here
|
||||
// Warning: (162-175): Assertion violation happens here.
|
||||
// Warning: (179-193): Assertion violation happens here.
|
||||
|
@ -21,7 +21,7 @@ contract B is A {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (122-136): Assertion violation happens here
|
||||
// Warning: (171-185): Assertion violation happens here
|
||||
// Warning: (288-302): Assertion violation happens here
|
||||
// Warning: (171-185): Assertion violation happens here
|
||||
// Warning: (122-136): Assertion violation happens here.
|
||||
// Warning: (171-185): Assertion violation happens here.
|
||||
// Warning: (288-302): Assertion violation happens here.
|
||||
// Warning: (171-185): Assertion violation happens here.
|
||||
|
@ -21,8 +21,8 @@ contract B is A {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (114-128): Assertion violation happens here
|
||||
// Warning: (163-177): Assertion violation happens here
|
||||
// Warning: (289-303): Assertion violation happens here
|
||||
// Warning: (114-128): Assertion violation happens here
|
||||
// Warning: (163-177): Assertion violation happens here
|
||||
// Warning: (114-128): Assertion violation happens here.
|
||||
// Warning: (163-177): Assertion violation happens here.
|
||||
// Warning: (289-303): Assertion violation happens here.
|
||||
// Warning: (114-128): Assertion violation happens here.
|
||||
// Warning: (163-177): Assertion violation happens here.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user