diff --git a/Changelog.md b/Changelog.md index 14125c809..5d36cd196 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,15 @@ +### 0.6.2 (unreleased) + +Language Features: + + +CompilerFeatures: + + +Bugfixes: + * Made usage of quotes in error and warning messages consistent + + ### 0.6.1 (2020-01-02) Bugfixes: diff --git a/liblangutil/ErrorReporter.cpp b/liblangutil/ErrorReporter.cpp index 312f159c0..f844a9740 100644 --- a/liblangutil/ErrorReporter.cpp +++ b/liblangutil/ErrorReporter.cpp @@ -28,6 +28,20 @@ using namespace std; using namespace solidity; using namespace solidity::langutil; +namespace solidity::langutil { + +std::string quote(std::string const& _name) +{ + return "\"" + _name + "\""; +} + +std::string quoteSpace(std::string const& _name) +{ + return " " +quote(_name) + " "; +} + +} + ErrorReporter& ErrorReporter::operator=(ErrorReporter const& _errorReporter) { if (&_errorReporter == this) diff --git a/liblangutil/ErrorReporter.h b/liblangutil/ErrorReporter.h index 3acf5afee..daf1a994e 100644 --- a/liblangutil/ErrorReporter.h +++ b/liblangutil/ErrorReporter.h @@ -33,6 +33,9 @@ namespace solidity::langutil { +std::string quote(std::string const& _name); +std::string quoteSpace(std::string const& _name); + class ErrorReporter { public: diff --git a/liblangutil/ParserBase.cpp b/liblangutil/ParserBase.cpp index 3c0fe0b89..a732d74d6 100644 --- a/liblangutil/ParserBase.cpp +++ b/liblangutil/ParserBase.cpp @@ -65,14 +65,14 @@ string ParserBase::tokenName(Token _token) else if (_token == Token::EOS) return "end of source"; else if (TokenTraits::isReservedKeyword(_token)) - return "reserved keyword '" + TokenTraits::friendlyName(_token) + "'"; + return "reserved keyword " + quote(TokenTraits::friendlyName(_token)); else if (TokenTraits::isElementaryTypeName(_token)) //for the sake of accuracy in reporting { ElementaryTypeNameToken elemTypeName = m_scanner->currentElementaryTypeNameToken(); - return "'" + elemTypeName.toString() + "'"; + return quote(elemTypeName.toString()); } else - return "'" + TokenTraits::friendlyName(_token) + "'"; + return quote(TokenTraits::friendlyName(_token)); } void ParserBase::expectToken(Token _value, bool _advance) diff --git a/libsolidity/analysis/ConstantEvaluator.cpp b/libsolidity/analysis/ConstantEvaluator.cpp index d48d640ce..05e838fe4 100644 --- a/libsolidity/analysis/ConstantEvaluator.cpp +++ b/libsolidity/analysis/ConstantEvaluator.cpp @@ -47,12 +47,13 @@ void ConstantEvaluator::endVisit(BinaryOperation const& _operation) if (!commonType) m_errorReporter.fatalTypeError( _operation.location(), - "Operator " + - string(TokenTraits::toString(_operation.getOperator())) + - " not compatible with types " + - left->toString() + - " and " + - right->toString() + "Operator" + + langutil::quoteSpace(string(TokenTraits::toString(_operation.getOperator()))) + + "not compatible with types" + + langutil::quoteSpace(left->toString()) + + "and " + + langutil::quote(right->toString()) + + "." ); setType( _operation, diff --git a/libsolidity/analysis/ContractLevelChecker.cpp b/libsolidity/analysis/ContractLevelChecker.cpp index 9cbe21894..5d7254c9a 100644 --- a/libsolidity/analysis/ContractLevelChecker.cpp +++ b/libsolidity/analysis/ContractLevelChecker.cpp @@ -209,7 +209,7 @@ void ContractLevelChecker::checkAbstractFunctions(ContractDefinition const& _con if (_contract.abstract()) { if (_contract.contractKind() == ContractDefinition::ContractKind::Interface) - m_errorReporter.typeError(_contract.location(), "Interfaces do not need the \"abstract\" keyword, they are abstract implicitly."); + m_errorReporter.typeError(_contract.location(), "Interfaces do not need the" + quoteSpace("abstract") + "keyword, they are abstract implicitly."); else if (_contract.contractKind() == ContractDefinition::ContractKind::Library) m_errorReporter.typeError(_contract.location(), "Libraries cannot be abstract."); else @@ -228,8 +228,8 @@ void ContractLevelChecker::checkAbstractFunctions(ContractDefinition const& _con for (auto function: _contract.annotation().unimplementedFunctions) ssl.append("Missing implementation:", function->location()); m_errorReporter.typeError(_contract.location(), ssl, - "Contract \"" + _contract.annotation().canonicalName - + "\" should be marked as abstract."); + "Contract" + quoteSpace(_contract.annotation().canonicalName) + + "should be marked as abstract."); } } @@ -368,7 +368,7 @@ void ContractLevelChecker::checkHashCollisions(ContractDefinition const& _contra if (hashes.count(hash)) m_errorReporter.typeError( _contract.location(), - string("Function signature hash collision for ") + it.second->externalSignature() + string("Function signature hash collision for ") + quote(it.second->externalSignature()) + "." ); hashes.insert(hash); } @@ -425,11 +425,11 @@ void ContractLevelChecker::checkBaseABICompatibility(ContractDefinition const& _ m_errorReporter.fatalTypeError( _contract.location(), errors, - std::string("Contract \"") + - _contract.name() + - "\" does not use ABIEncoderV2 but wants to inherit from a contract " + + std::string("Contract") + + quoteSpace(_contract.name()) + + "does not use ABIEncoderV2 but wants to inherit from a contract " + "which uses types that require it. " + - "Use \"pragma experimental ABIEncoderV2;\" for the inheriting contract as well to enable the feature." + "Use" + quoteSpace("pragma experimental ABIEncoderV2;") + "for the inheriting contract as well to enable the feature." ); } diff --git a/libsolidity/analysis/DocStringAnalyser.cpp b/libsolidity/analysis/DocStringAnalyser.cpp index 1b3bd598b..78b8f9dab 100644 --- a/libsolidity/analysis/DocStringAnalyser.cpp +++ b/libsolidity/analysis/DocStringAnalyser.cpp @@ -86,9 +86,9 @@ void DocStringAnalyser::checkParameters( for (auto i = paramRange.first; i != paramRange.second; ++i) if (!validParams.count(i->second.paramName)) appendError( - "Documented parameter \"" + - i->second.paramName + - "\" not found in the parameter list of the function." + "Documented parameter" + + quoteSpace(i->second.paramName) + + "not found in the parameter list of the function." ); } @@ -134,7 +134,7 @@ void DocStringAnalyser::parseDocStrings( for (auto const& docTag: _annotation.docTags) { if (!_validTags.count(docTag.first)) - appendError("Documentation tag @" + docTag.first + " not valid for " + _nodeName + "."); + appendError("Documentation tag" + quoteSpace("@" + docTag.first) + "not valid for " + _nodeName + "."); else if (docTag.first == "return") { @@ -145,15 +145,15 @@ void DocStringAnalyser::parseDocStrings( string firstWord = content.substr(0, content.find_first_of(" \t")); if (returnTagsVisited > function->returnParameters().size()) - appendError("Documentation tag \"@" + docTag.first + " " + docTag.second.content + "\"" + - " exceedes the number of return parameters." + appendError("Documentation tag" + quoteSpace("@" + docTag.first + " " + docTag.second.content) + + "exceedes the number of return parameters." ); else { auto parameter = function->returnParameters().at(returnTagsVisited - 1); if (!parameter->name().empty() && parameter->name() != firstWord) - appendError("Documentation tag \"@" + docTag.first + " " + docTag.second.content + "\"" + - " does not contain the name of its return parameter." + appendError("Documentation tag" + quoteSpace("@" + docTag.first + " " + docTag.second.content) + + "does not contain the name of its return parameter." ); } } diff --git a/libsolidity/analysis/NameAndTypeResolver.cpp b/libsolidity/analysis/NameAndTypeResolver.cpp index c2e9124a7..5c7ead2bb 100644 --- a/libsolidity/analysis/NameAndTypeResolver.cpp +++ b/libsolidity/analysis/NameAndTypeResolver.cpp @@ -81,7 +81,7 @@ bool NameAndTypeResolver::performImports(SourceUnit& _sourceUnit, maplocation(), - "Import \"" + path + "\" (referenced as \"" + imp->path() + "\") not found." + "Import" + quoteSpace(path) + "(referenced as " + quote(imp->path()) + ") not found." ); error = true; continue; @@ -96,13 +96,13 @@ bool NameAndTypeResolver::performImports(SourceUnit& _sourceUnit, maplocation(), - "Declaration \"" + - alias.symbol->name() + - "\" not found in \"" + - path + - "\" (referenced as \"" + - imp->path() + - "\")." + "Declaration" + + quoteSpace(alias.symbol->name()) + + "not found in" + + quoteSpace(path) + + "(referenced as " + + quote(imp->path()) + + ")." ); error = true; } diff --git a/libsolidity/analysis/OverrideChecker.cpp b/libsolidity/analysis/OverrideChecker.cpp index fc2c8df62..b56bf9c58 100644 --- a/libsolidity/analysis/OverrideChecker.cpp +++ b/libsolidity/analysis/OverrideChecker.cpp @@ -495,7 +495,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" + quoteSpace("override") + "specifier."); if (_super.isVariable()) overrideError( @@ -508,7 +508,7 @@ void OverrideChecker::checkOverride(OverrideProxy const& _overriding, OverridePr overrideError( _super, _overriding, - "Trying to override non-virtual " + _super.astNodeName() + ". Did you forget to add \"virtual\"?", + "Trying to override non-virtual " + _super.astNodeName() + ". Did you forget to add " + quote("virtual") + "?", "Overriding " + _overriding.astNodeName() + " is here:" ); @@ -546,11 +546,11 @@ void OverrideChecker::checkOverride(OverrideProxy const& _overriding, OverridePr overrideError( _overriding, _super, - "Overriding function changes state mutability from \"" + - stateMutabilityToString(_super.stateMutability()) + - "\" to \"" + - stateMutabilityToString(_overriding.stateMutability()) + - "\"." + "Overriding function changes state mutability from" + + quoteSpace(stateMutabilityToString(_super.stateMutability())) + + "to " + + quote(stateMutabilityToString(_overriding.stateMutability())) + + "." ); if (_overriding.unimplemented() && !_super.unimplemented()) @@ -576,7 +576,7 @@ void OverrideChecker::overrideListError( for (Declaration const* c: _secondary) { ssl.append("This contract: ", c->location()); - names.insert("\"" + c->name() + "\""); + names.insert(quote(c->name())); } string contractSingularPlural = "contract "; if (_secondary.size() > 1) @@ -699,9 +699,9 @@ void OverrideChecker::checkAmbiguousOverridesInternal(set _baseCa foundVariable = true; string message = - "Derived contract must override " + callableName + " \"" + - _baseCallables.begin()->name() + - "\". Two or more base classes define " + callableName + " with same " + distinguishigProperty + "."; + "Derived contract must override " + callableName + " " + + quote(_baseCallables.begin()->name()) + + ". Two or more base classes define " + callableName + " with same " + distinguishigProperty + "."; if (foundVariable) message += @@ -758,11 +758,11 @@ void OverrideChecker::checkOverrideList(OverrideProxy _item, OverrideProxyBySign m_errorReporter.typeError( list[i]->location(), ssl, - "Duplicate contract \"" + - joinHumanReadable(list[i]->namePath(), ".") + - "\" found in override list of \"" + - _item.name() + - "\"." + "Duplicate contract" + + quoteSpace(joinHumanReadable(list[i]->namePath(), ".")) + + "found in override list of " + + quote(_item.name()) + + "." ); } } diff --git a/libsolidity/analysis/PostTypeChecker.cpp b/libsolidity/analysis/PostTypeChecker.cpp index a83c51d3b..c6c5b431d 100644 --- a/libsolidity/analysis/PostTypeChecker.cpp +++ b/libsolidity/analysis/PostTypeChecker.cpp @@ -89,8 +89,8 @@ struct ConstStateVarCircularReferenceChecker: public PostTypeChecker::Checker if (auto identifier = findCycle(*declaration)) m_errorReporter.typeError( declaration->location(), - "The value of the constant " + declaration->name() + - " has a cyclic dependency via " + identifier->name() + "." + "The value of the constant" + quoteSpace(declaration->name()) + + "has a cyclic dependency via " + quote(identifier->name()) + "." ); m_constVariables.clear(); diff --git a/libsolidity/analysis/ReferencesResolver.cpp b/libsolidity/analysis/ReferencesResolver.cpp index 889ec4d2d..09775b6a9 100644 --- a/libsolidity/analysis/ReferencesResolver.cpp +++ b/libsolidity/analysis/ReferencesResolver.cpp @@ -200,7 +200,7 @@ void ReferencesResolver::endVisit(FunctionTypeName const& _typeName) case Visibility::External: break; default: - fatalTypeError(_typeName.location(), "Invalid visibility, can only be \"external\" or \"internal\"."); + fatalTypeError(_typeName.location(), "Invalid visibility, can only be" + quoteSpace("external") + "or " + quote("internal") + "."); return; } @@ -284,7 +284,7 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly) { string namePrefix = _identifier.name.str().substr(0, _identifier.name.str().find('.')); if (isSlot || isOffset) - declarationError(_identifier.location, "In variable declarations _slot and _offset can not be used as a suffix."); + declarationError(_identifier.location, "In variable declarations" + quoteSpace("_slot") + "and" + quoteSpace("_offset") + "can not be used as a suffix."); else if ( auto declarations = m_resolver.nameFromCurrentScope(namePrefix); !declarations.empty() @@ -318,7 +318,7 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly) )); if (realName.empty()) { - declarationError(_identifier.location, "In variable names _slot and _offset can only be used as a suffix."); + declarationError(_identifier.location, "In variable names" + quoteSpace("_slot") + "and" + quoteSpace("_offset") + "can only be used as a suffix."); return size_t(-1); } declarations = m_resolver.nameFromCurrentScope(realName); @@ -367,7 +367,7 @@ void ReferencesResolver::endVisit(VariableDeclaration const& _variable) return; if (_variable.isConstant() && !_variable.isStateVariable()) - m_errorReporter.declarationError(_variable.location(), "The \"constant\" keyword can only be used for state variables."); + m_errorReporter.declarationError(_variable.location(), "The" + quoteSpace("constant") + "keyword can only be used for state variables."); if (!_variable.typeName()) { diff --git a/libsolidity/analysis/StaticAnalyzer.cpp b/libsolidity/analysis/StaticAnalyzer.cpp index c53bc03fa..55522c78c 100644 --- a/libsolidity/analysis/StaticAnalyzer.cpp +++ b/libsolidity/analysis/StaticAnalyzer.cpp @@ -197,12 +197,12 @@ bool StaticAnalyzer::visit(MemberAccess const& _memberAccess) if (type->kind() == MagicType::Kind::Message && _memberAccess.memberName() == "gas") m_errorReporter.typeError( _memberAccess.location(), - "\"msg.gas\" has been deprecated in favor of \"gasleft()\"" + quote("msg.gas") + " has been deprecated in favor of " + quote("gasleft()") + "." ); else if (type->kind() == MagicType::Kind::Block && _memberAccess.memberName() == "blockhash") m_errorReporter.typeError( _memberAccess.location(), - "\"block.blockhash()\" has been deprecated in favor of \"blockhash()\"" + quote("block.blockhash()") + " has been deprecated in favor of " + quote("blockhash()") + "." ); else if (type->kind() == MagicType::Kind::MetaType && _memberAccess.memberName() == "runtimeCode") { @@ -223,7 +223,7 @@ bool StaticAnalyzer::visit(MemberAccess const& _memberAccess) if (type->kind() == FunctionType::Kind::BareCallCode) m_errorReporter.typeError( _memberAccess.location(), - "\"callcode\" has been deprecated in favour of \"delegatecall\"." + quote("callcode") + " has been deprecated in favour of" + quote("delegatecall") + "." ); if (m_constructor) @@ -236,7 +236,7 @@ bool StaticAnalyzer::visit(MemberAccess const& _memberAccess) if (id->name() == "this") m_errorReporter.warning( id->location(), - "\"this\" used in constructor. " + quote("this") + " used in constructor. " "Note that external functions of a contract " "cannot be called while it is being constructed."); break; diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp index 666c15dc5..9c869d9ad 100644 --- a/libsolidity/analysis/SyntaxChecker.cpp +++ b/libsolidity/analysis/SyntaxChecker.cpp @@ -60,13 +60,16 @@ void SyntaxChecker::endVisit(SourceUnit const& _sourceUnit) SemVerVersion recommendedVersion{string(VersionString)}; if (!recommendedVersion.isPrerelease()) errorString += - " Consider adding \"pragma solidity ^" + - to_string(recommendedVersion.major()) + - string(".") + - to_string(recommendedVersion.minor()) + - string(".") + - to_string(recommendedVersion.patch()) + - string(";\""); + " Consider adding " + + quoteSpace("pragma solidity ^" + + to_string(recommendedVersion.major()) + + string(".") + + to_string(recommendedVersion.minor()) + + string(".") + + to_string(recommendedVersion.patch()) + + string(";") + ) + + "."; m_errorReporter.warning(_sourceUnit.location(), errorString); } @@ -78,7 +81,7 @@ bool SyntaxChecker::visit(PragmaDirective const& _pragma) solAssert(!_pragma.tokens().empty(), ""); solAssert(_pragma.tokens().size() == _pragma.literals().size(), ""); if (_pragma.tokens()[0] != Token::Identifier) - m_errorReporter.syntaxError(_pragma.location(), "Invalid pragma \"" + _pragma.literals()[0] + "\""); + m_errorReporter.syntaxError(_pragma.location(), "Invalid pragma " + quote(_pragma.literals()[0]) + "."); else if (_pragma.literals()[0] == "experimental") { solAssert(m_sourceUnit, ""); @@ -128,7 +131,7 @@ bool SyntaxChecker::visit(PragmaDirective const& _pragma) m_versionPragmaFound = true; } else - m_errorReporter.syntaxError(_pragma.location(), "Unknown pragma \"" + _pragma.literals()[0] + "\""); + m_errorReporter.syntaxError(_pragma.location(), "Unknown pragma " + quoteSpace(_pragma.literals()[0]) + "."); return true; } @@ -141,7 +144,7 @@ bool SyntaxChecker::visit(ModifierDefinition const&) void SyntaxChecker::endVisit(ModifierDefinition const& _modifier) { if (!m_placeholderFound) - m_errorReporter.syntaxError(_modifier.body().location(), "Modifier body does not contain '_'."); + m_errorReporter.syntaxError(_modifier.body().location(), "Modifier body does not contain " + quote("_") + "."); m_placeholderFound = false; } @@ -188,7 +191,7 @@ bool SyntaxChecker::visit(Continue const& _continueStatement) { if (m_inLoopDepth <= 0) // we're not in a for/while loop, report syntax error - m_errorReporter.syntaxError(_continueStatement.location(), "\"continue\" has to be in a \"for\" or \"while\" loop."); + m_errorReporter.syntaxError(_continueStatement.location(), quote("continue") + " has to be in a" + quoteSpace("for") + "or" + quoteSpace("while") + "loop."); return true; } @@ -196,7 +199,7 @@ bool SyntaxChecker::visit(Break const& _breakStatement) { if (m_inLoopDepth <= 0) // we're not in a for/while loop, report syntax error - m_errorReporter.syntaxError(_breakStatement.location(), "\"break\" has to be in a \"for\" or \"while\" loop."); + m_errorReporter.syntaxError(_breakStatement.location(), quote("break") + " has to be in a" + quoteSpace("for") + "or" + quoteSpace("while") + "loop."); return true; } @@ -204,7 +207,7 @@ bool SyntaxChecker::visit(Throw const& _throwStatement) { m_errorReporter.syntaxError( _throwStatement.location(), - "\"throw\" is deprecated in favour of \"revert()\", \"require()\" and \"assert()\"." + quote("throw") + " is deprecated in favour of " + quote("revert()") + "," + quoteSpace("require()") + "and " + quote("assert()") + "." ); return true; @@ -218,32 +221,31 @@ bool SyntaxChecker::visit(Literal const& _literal) ASTString const& value = _literal.value(); solAssert(!value.empty(), ""); + static string const errMsgBegin = "Invalid use of underscores in number literal. "; + // Generic checks no matter what base this number literal is of: if (value.back() == '_') { - m_errorReporter.syntaxError(_literal.location(), "Invalid use of underscores in number literal. No trailing underscores allowed."); + m_errorReporter.syntaxError(_literal.location(), errMsgBegin + "No trailing underscores allowed."); return true; } if (value.find("__") != ASTString::npos) { - m_errorReporter.syntaxError(_literal.location(), "Invalid use of underscores in number literal. Only one consecutive underscores between digits allowed."); + m_errorReporter.syntaxError(_literal.location(), errMsgBegin + "Only one consecutive underscores between digits allowed."); return true; } if (!_literal.isHexNumber()) // decimal literal { - if (value.find("._") != ASTString::npos) - m_errorReporter.syntaxError(_literal.location(), "Invalid use of underscores in number literal. No underscores in front of the fraction part allowed."); - - if (value.find("_.") != ASTString::npos) - m_errorReporter.syntaxError(_literal.location(), "Invalid use of underscores in number literal. No underscores in front of the fraction part allowed."); + if (value.find("._") != ASTString::npos || value.find("_.") != ASTString::npos) + m_errorReporter.syntaxError(_literal.location(), errMsgBegin + "No underscores in front of the fraction part allowed."); if (value.find("_e") != ASTString::npos) - m_errorReporter.syntaxError(_literal.location(), "Invalid use of underscores in number literal. No underscore at the end of the mantissa allowed."); + m_errorReporter.syntaxError(_literal.location(), errMsgBegin + "No underscore at the end of the mantissa allowed."); if (value.find("e_") != ASTString::npos) - m_errorReporter.syntaxError(_literal.location(), "Invalid use of underscores in number literal. No underscore in front of exponent allowed."); + m_errorReporter.syntaxError(_literal.location(), errMsgBegin + "No underscore in front of exponent allowed."); } return true; @@ -252,7 +254,7 @@ bool SyntaxChecker::visit(Literal const& _literal) bool SyntaxChecker::visit(UnaryOperation const& _operation) { if (_operation.getOperator() == Token::Add) - m_errorReporter.syntaxError(_operation.location(), "Use of unary + is disallowed."); + m_errorReporter.syntaxError(_operation.location(), "Use of unary" + quoteSpace("+") + "is disallowed."); return true; } @@ -286,7 +288,7 @@ bool SyntaxChecker::visit(ContractDefinition const& _contract) if (function->name() == contractName) m_errorReporter.syntaxError(function->location(), "Functions are not allowed to have the same name as the contract. " - "If you intend this to be a constructor, use \"constructor(...) { ... }\" to define it." + "If you intend this to be a constructor, use" + quoteSpace("constructor(...) { ... }") + "to define it." ); return true; } @@ -298,7 +300,7 @@ bool SyntaxChecker::visit(FunctionDefinition const& _function) string suggestedVisibility = _function.isFallback() || _function.isReceive() || m_isInterface ? "external" : "public"; m_errorReporter.syntaxError( _function.location(), - "No visibility specified. Did you intend to add \"" + suggestedVisibility + "\"?" + "No visibility specified. Did you intend to add " + quote(suggestedVisibility) + "?" ); } @@ -327,7 +329,7 @@ bool SyntaxChecker::visit(VariableDeclarationStatement const& _statement) if (boost::algorithm::all_of_equal(_statement.declarations(), nullptr)) m_errorReporter.syntaxError( _statement.location(), - "The use of the \"var\" keyword is disallowed. The declaration part of the statement can be removed, since it is empty." + "The use of the" + quoteSpace("var") + "keyword is disallowed. The declaration part of the statement can be removed, since it is empty." ); return true; diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index e1b289c73..8a8c51a11 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -143,9 +143,9 @@ TypePointers TypeChecker::typeCheckABIDecodeAndRetrieveReturnType(FunctionCall c ) m_errorReporter.typeError( arguments.front()->location(), - "The first argument to \"abi.decode\" must be implicitly convertible to " - "bytes memory or bytes calldata, but is of type " + - type(*arguments.front())->toString() + + "The first argument to" + quoteSpace("abi.decode") + "must be implicitly convertible to" + + quoteSpace("bytes memory") + "or " + quote("bytes calldata") + ", but is of type " + + quote(type(*arguments.front())->toString()) + "." ); @@ -159,7 +159,7 @@ TypePointers TypeChecker::typeCheckABIDecodeAndRetrieveReturnType(FunctionCall c { m_errorReporter.typeError( arguments[1]->location(), - "The second argument to \"abi.decode\" has to be a tuple of types." + "The second argument to" + quoteSpace("abi.decode") + "has to be a tuple of types." ); return {}; } @@ -187,7 +187,7 @@ TypePointers TypeChecker::typeCheckABIDecodeAndRetrieveReturnType(FunctionCall c if (!actualType->fullEncodingType(false, _abiEncoderV2, false)) m_errorReporter.typeError( typeArgument->location(), - "Decoding type " + actualType->toString(false) + " not supported." + "Decoding type" + quoteSpace(actualType->toString(false)) + "not supported." ); components.push_back(actualType); } @@ -222,9 +222,9 @@ TypePointers TypeChecker::typeCheckMetaTypeFunctionAndRetrieveReturnType(Functio m_errorReporter.typeError( arguments.front()->location(), "Invalid type for argument in function call. " - "Contract type required, but " + - type(*arguments.front())->toString(true) + - " provided." + "Contract type required, but" + + quoteSpace(type(*arguments.front())->toString(true)) + + "provided." ); return {}; } @@ -269,11 +269,11 @@ void TypeChecker::endVisit(InheritanceSpecifier const& _inheritance) m_errorReporter.typeErrorConcatenateDescriptions( (*arguments)[i]->location(), "Invalid type for argument in constructor call. " - "Invalid implicit conversion from " + - type(*(*arguments)[i])->toString() + - " to " + - parameterTypes[i]->toString() + - " requested.", + "Invalid implicit conversion from" + + quoteSpace(type(*(*arguments)[i])->toString()) + + "to" + + quoteSpace(parameterTypes[i]->toString()) + + "requested.", result.message() ); } @@ -332,9 +332,9 @@ bool TypeChecker::visit(FunctionDefinition const& _function) if (_function.markedVirtual()) { if (_function.annotation().contract->isInterface()) - m_errorReporter.warning(_function.location(), "Interface functions are implicitly \"virtual\""); + m_errorReporter.warning(_function.location(), "Interface functions are implicitly " + quote("virtual") + "."); if (_function.visibility() == Visibility::Private) - m_errorReporter.typeError(_function.location(), "\"virtual\" and \"private\" cannot be used together."); + m_errorReporter.typeError(_function.location(), quote("virtual") + " and" + quoteSpace("private") + "cannot be used together."); } if (_function.isPayable()) @@ -350,9 +350,9 @@ bool TypeChecker::visit(FunctionDefinition const& _function) if (var.referenceLocation() != VariableDeclaration::Location::Storage) { if (!isLibraryFunction && _function.isPublic()) - m_errorReporter.typeError(var.location(), "Mapping types can only have a data location of \"storage\" and thus only be parameters or return variables for internal or library functions."); + m_errorReporter.typeError(var.location(), "Mapping types can only have a data location of" + quoteSpace("storage") + "and thus only be parameters or return variables for internal or library functions."); else - m_errorReporter.typeError(var.location(), "Mapping types can only have a data location of \"storage\"." ); + m_errorReporter.typeError(var.location(), "Mapping types can only have a data location of " + quote("storage") + "."); } else { @@ -382,7 +382,7 @@ bool TypeChecker::visit(FunctionDefinition const& _function) m_errorReporter.typeError( var.location(), "This type is only supported in ABIEncoderV2. " - "Use \"pragma experimental ABIEncoderV2;\" to enable the feature." + "Use" + quoteSpace("pragma experimental ABIEncoderV2;") + "to enable the feature." ); }; for (ASTPointer const& var: _function.parameters()) @@ -486,7 +486,7 @@ bool TypeChecker::visit(VariableDeclaration const& _variable) } if (!_variable.value()) - m_errorReporter.typeError(_variable.location(), "Uninitialized \"constant\" variable."); + m_errorReporter.typeError(_variable.location(), "Uninitialized" + quoteSpace("constant") + "variable."); else if (!_variable.value()->annotation().isPure) m_errorReporter.typeError( _variable.value()->location(), @@ -497,7 +497,7 @@ bool TypeChecker::visit(VariableDeclaration const& _variable) { if (varType->dataStoredIn(DataLocation::Memory) || varType->dataStoredIn(DataLocation::CallData)) if (!varType->canLiveOutsideStorage()) - m_errorReporter.typeError(_variable.location(), "Type " + varType->toString() + " is only valid in storage."); + m_errorReporter.typeError(_variable.location(), "Type" + quoteSpace(varType->toString()) + "is only valid in storage."); } else if (_variable.visibility() >= Visibility::Public) { @@ -512,7 +512,7 @@ bool TypeChecker::visit(VariableDeclaration const& _variable) m_errorReporter.typeError(_variable.location(), "The following types are only supported for getters in ABIEncoderV2: " + joinHumanReadable(unsupportedTypes) + - ". Either remove \"public\" or use \"pragma experimental ABIEncoderV2;\" to enable the feature." + ". Either remove" + quoteSpace("public") + "or use" + quoteSpace("pragma experimental ABIEncoderV2;") + "to enable the feature." ); } if (!getter.interfaceFunctionType()) @@ -593,11 +593,11 @@ void TypeChecker::visitManually( m_errorReporter.typeErrorConcatenateDescriptions( arguments[i]->location(), "Invalid type for argument in modifier invocation. " - "Invalid implicit conversion from " + - type(*arguments[i])->toString() + - " to " + - type(*(*parameters)[i])->toString() + - " requested.", + "Invalid implicit conversion from" + + quoteSpace(type(*arguments[i])->toString()) + + "to" + + quoteSpace(type(*(*parameters)[i])->toString()) + + "requested.", result.message() ); } @@ -622,7 +622,7 @@ bool TypeChecker::visit(EventDefinition const& _eventDef) m_errorReporter.typeError( var->location(), "This type is only supported in ABIEncoderV2. " - "Use \"pragma experimental ABIEncoderV2;\" to enable the feature." + "Use" + quoteSpace("pragma experimental ABIEncoderV2;") + "to enable the feature." ); } if (_eventDef.isAnonymous() && numIndexed > 4) @@ -682,7 +682,7 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly) } else if (requiresStorage) { - m_errorReporter.typeError(_identifier.location, "The suffixes _offset and _slot can only be used on non-constant storage variables."); + m_errorReporter.typeError(_identifier.location, "The suffixes" + quoteSpace("_offset") + "and" + quoteSpace("_slot") + "can only be used on non-constant storage variables."); return size_t(-1); } } @@ -691,7 +691,7 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly) { if (!var->isStateVariable() && !var->type()->dataStoredIn(DataLocation::Storage)) { - m_errorReporter.typeError(_identifier.location, "The suffixes _offset and _slot can only be used on storage variables."); + m_errorReporter.typeError(_identifier.location, "The suffixes" + quoteSpace("_offset") + "and" + quoteSpace("_slot") + "can only be used on storage variables."); return size_t(-1); } else if (_context != yul::IdentifierContext::RValue) @@ -702,18 +702,18 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly) } else if (!var->isConstant() && var->isStateVariable()) { - m_errorReporter.typeError(_identifier.location, "Only local variables are supported. To access storage variables, use the _slot and _offset suffixes."); + m_errorReporter.typeError(_identifier.location, "Only local variables are supported. To access storage variables, use the" + quoteSpace("_slot") + "and" + quoteSpace("_offset") + "suffixes."); return size_t(-1); } else if (var->type()->dataStoredIn(DataLocation::Storage)) { - m_errorReporter.typeError(_identifier.location, "You have to use the _slot or _offset suffix to access storage reference variables."); + m_errorReporter.typeError(_identifier.location, "You have to use the" + quoteSpace("_slot") + "or" + quoteSpace("_offset") + "suffix to access storage reference variables."); return size_t(-1); } else if (var->type()->sizeOnStack() != 1) { if (var->type()->dataStoredIn(DataLocation::CallData)) - m_errorReporter.typeError(_identifier.location, "Call data elements cannot be accessed directly. Copy to a local variable first or use \"calldataload\" or \"calldatacopy\" with manually determined offsets and sizes."); + m_errorReporter.typeError(_identifier.location, "Call data elements cannot be accessed directly. Copy to a local variable first or use" + quoteSpace("calldataload") + "or" + quoteSpace("calldatacopy") + "with manually determined offsets and sizes."); else m_errorReporter.typeError(_identifier.location, "Only types that use one stack slot are supported."); return size_t(-1); @@ -721,7 +721,7 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly) } else if (requiresStorage) { - m_errorReporter.typeError(_identifier.location, "The suffixes _offset and _slot can only be used on storage variables."); + m_errorReporter.typeError(_identifier.location, "The suffixes" + quoteSpace("_offset") + "and" + quoteSpace("_slot") + "can only be used on storage variables."); return size_t(-1); } else if (_context == yul::IdentifierContext::LValue) @@ -834,10 +834,10 @@ void TypeChecker::endVisit(TryStatement const& _tryStatement) if (parameters[i] && *parameters[i]->annotation().type != *returnTypes[i]) m_errorReporter.typeError( parameters[i]->location(), - "Invalid type, expected " + - returnTypes[i]->toString(false) + - " but got " + - parameters[i]->annotation().type->toString() + + "Invalid type, expected" + + quoteSpace(returnTypes[i]->toString(false)) + + "but got " + + quote(parameters[i]->annotation().type->toString()) + "." ); } @@ -863,13 +863,13 @@ void TypeChecker::endVisit(TryStatement const& _tryStatement) clause.parameters()->parameters().size() != 1 || *clause.parameters()->parameters().front()->type() != *TypeProvider::bytesMemory() ) - m_errorReporter.typeError(clause.location(), "Expected `catch (bytes memory ...) { ... }` or `catch { ... }`."); + m_errorReporter.typeError(clause.location(), "Expected" + quoteSpace("catch (bytes memory ...) { ... }") + "or " + quote("catch { ... }") + "."); if (!m_evmVersion.supportsReturndata()) m_errorReporter.typeError( clause.location(), "This catch clause type cannot be used on the selected EVM version (" + m_evmVersion.name() + - "). You need at least a Byzantium-compatible EVM or use `catch { ... }`." + "). You need at least a Byzantium-compatible EVM or use " + quote("catch { ... }") + "." ); } } @@ -880,14 +880,14 @@ void TypeChecker::endVisit(TryStatement const& _tryStatement) clause.location(), "This catch clause type cannot be used on the selected EVM version (" + m_evmVersion.name() + - "). You need at least a Byzantium-compatible EVM or use `catch { ... }`." + "). You need at least a Byzantium-compatible EVM or use " + quote("catch { ... }") + "." ); if (errorClause) m_errorReporter.typeError( clause.location(), SecondarySourceLocation{}.append("The first clause is here:", errorClause->location()), - "This try statement already has an \"Error\" catch clause." + "This try statement already has an" + quoteSpace("Error") + "catch clause." ); errorClause = &clause; if ( @@ -895,7 +895,7 @@ void TypeChecker::endVisit(TryStatement const& _tryStatement) clause.parameters()->parameters().size() != 1 || *clause.parameters()->parameters().front()->type() != *TypeProvider::stringMemory() ) - m_errorReporter.typeError(clause.location(), "Expected `catch Error(string memory ...) { ... }`."); + m_errorReporter.typeError(clause.location(), "Expected " + quote("catch Error(string memory ...) { ... }") + "."); } else m_errorReporter.typeError( @@ -951,10 +951,10 @@ void TypeChecker::endVisit(Return const& _return) if (!result) m_errorReporter.typeErrorConcatenateDescriptions( _return.expression()->location(), - "Return argument type " + - type(*_return.expression())->toString() + - " is not implicitly convertible to expected type " + - TupleType(returnTypes).toString(false) + ".", + "Return argument type" + + quoteSpace(type(*_return.expression())->toString()) + + "is not implicitly convertible to expected type " + + quote(TupleType(returnTypes).toString(false)) + ".", result.message() ); } @@ -968,10 +968,10 @@ void TypeChecker::endVisit(Return const& _return) if (!result) m_errorReporter.typeErrorConcatenateDescriptions( _return.expression()->location(), - "Return argument type " + - type(*_return.expression())->toString() + - " is not implicitly convertible to expected type (type of first return variable) " + - expected->toString() + ".", + "Return argument type" + + quoteSpace(type(*_return.expression())->toString()) + + "is not implicitly convertible to expected type (type of first return variable) " + + quote(expected->toString()) + ".", result.message() ); } @@ -1053,12 +1053,12 @@ bool TypeChecker::visit(VariableDeclarationStatement const& _statement) } else // Bailing out *fatal* here, as those (untyped) vars may be used later, and diagnostics wouldn't be helpful then. - m_errorReporter.fatalTypeError(_statement.location(), "Use of the \"var\" keyword is disallowed."); + m_errorReporter.fatalTypeError(_statement.location(), "Use of the" + quoteSpace("var") + "keyword is disallowed."); } VariableDeclaration const& varDecl = *_statement.declarations().front(); if (!varDecl.annotation().type) - m_errorReporter.fatalTypeError(_statement.location(), "Use of the \"var\" keyword is disallowed."); + m_errorReporter.fatalTypeError(_statement.location(), "Use of the" + quoteSpace("var") + "keyword is disallowed."); if (auto ref = dynamic_cast(type(varDecl))) { @@ -1125,9 +1125,9 @@ bool TypeChecker::visit(VariableDeclarationStatement const& _statement) if (valueComponentType->category() == Type::Category::RationalNumber) m_errorReporter.fatalTypeError( _statement.initialValue()->location(), - "Invalid rational " + - valueComponentType->toString() + - " (absolute value too large or division by zero)." + "Invalid rational" + + quoteSpace(valueComponentType->toString()) + + "(absolute value too large or division by zero)." ); else solAssert(false, ""); @@ -1167,10 +1167,10 @@ bool TypeChecker::visit(VariableDeclarationStatement const& _statement) BoolResult result = valueComponentType->isImplicitlyConvertibleTo(*var.annotation().type); if (!result) { - auto errorMsg = "Type " + - valueComponentType->toString() + - " is not implicitly convertible to expected type " + - var.annotation().type->toString(); + auto errorMsg = "Type" + + quoteSpace(valueComponentType->toString()) + + "is not implicitly convertible to expected type " + + quote(var.annotation().type->toString()); if ( valueComponentType->category() == Type::Category::RationalNumber && dynamic_cast(*valueComponentType).isFractional() && @@ -1186,9 +1186,9 @@ bool TypeChecker::visit(VariableDeclarationStatement const& _statement) m_errorReporter.typeError( _statement.location(), errorMsg + - ". Try converting to type " + - valueComponentType->mobileType()->toString() + - " or use an explicit conversion." + ". Try converting to type" + + quoteSpace(valueComponentType->mobileType()->toString()) + + "or use an explicit conversion." ); } else @@ -1214,14 +1214,14 @@ bool TypeChecker::visit(VariableDeclarationStatement const& _statement) if (!typeCanBeExpressed(variables)) m_errorReporter.syntaxError( _statement.location(), - "Use of the \"var\" keyword is disallowed. " + "Use of the" + quoteSpace("var") + "keyword is disallowed. " "Type cannot be expressed in syntax." ); else m_errorReporter.syntaxError( _statement.location(), - "Use of the \"var\" keyword is disallowed. " - "Use explicit declaration `" + createTupleDecl(variables) + " = ...´ instead." + "Use of the" + quoteSpace("var") + "keyword is disallowed. " + "Use explicit declaration" + quoteSpace(createTupleDecl(variables) + " = ...") + "instead." ); } @@ -1247,7 +1247,7 @@ void TypeChecker::endVisit(ExpressionStatement const& _statement) ) m_errorReporter.warning(_statement.location(), "Return value of low-level calls not used."); else if (kind == FunctionType::Kind::Send) - m_errorReporter.warning(_statement.location(), "Failure condition of 'send' ignored. Consider using 'transfer' instead."); + m_errorReporter.warning(_statement.location(), "Failure condition of" + quoteSpace("send") + "ignored. Consider using" + quoteSpace("transfer") + "instead."); } } } @@ -1284,10 +1284,10 @@ bool TypeChecker::visit(Conditional const& _conditional) { m_errorReporter.typeError( _conditional.location(), - "True expression's type " + - trueType->toString() + - " doesn't match false expression's type " + - falseType->toString() + + "True expression's type" + + quoteSpace(trueType->toString()) + + "doesn't match false expression's type " + + quote(falseType->toString()) + "." ); // even we can't find a common type, we have to set a type here, @@ -1379,12 +1379,13 @@ bool TypeChecker::visit(Assignment const& _assignment) if (!resultType || *resultType != *t) m_errorReporter.typeError( _assignment.location(), - "Operator " + - string(TokenTraits::toString(_assignment.assignmentOperator())) + - " not compatible with types " + - t->toString() + - " and " + - type(_assignment.rightHandSide())->toString() + "Operator" + + quoteSpace(string(TokenTraits::toString(_assignment.assignmentOperator()))) + + "not compatible with types" + + quoteSpace(t->toString()) + + "and " + + quote(type(_assignment.rightHandSide())->toString()) + + "." ); } return false; @@ -1465,7 +1466,7 @@ bool TypeChecker::visit(TupleExpression const& _tuple) if (!inlineArrayType) m_errorReporter.fatalTypeError(_tuple.location(), "Unable to deduce common type for array elements."); else if (!inlineArrayType->canLiveOutsideStorage()) - m_errorReporter.fatalTypeError(_tuple.location(), "Type " + inlineArrayType->toString() + " is only valid in storage."); + m_errorReporter.fatalTypeError(_tuple.location(), "Type" + quoteSpace(inlineArrayType->toString()) + "is only valid in storage."); _tuple.annotation().type = TypeProvider::array(DataLocation::Memory, inlineArrayType, types.size()); } @@ -1496,10 +1497,11 @@ bool TypeChecker::visit(UnaryOperation const& _operation) { m_errorReporter.typeError( _operation.location(), - "Unary operator " + - string(TokenTraits::toString(op)) + - " cannot be applied to type " + - subExprType->toString() + "Unary operator" + + quoteSpace(string(TokenTraits::toString(op))) + + "cannot be applied to type " + + quote(subExprType->toString()) + + "." ); t = subExprType; } @@ -1518,13 +1520,14 @@ void TypeChecker::endVisit(BinaryOperation const& _operation) { m_errorReporter.typeError( _operation.location(), - "Operator " + - string(TokenTraits::toString(_operation.getOperator())) + - " not compatible with types " + - leftType->toString() + - " and " + - rightType->toString() + - (!result.message().empty() ? ". " + result.message() : "") + "Operator" + + quoteSpace(string(TokenTraits::toString(_operation.getOperator()))) + + "not compatible with types" + + quoteSpace(leftType->toString()) + + "and " + + quote(rightType->toString()) + + "." + + (!result.message().empty() ? " " + result.message() : "") ); commonType = leftType; } @@ -1553,7 +1556,7 @@ void TypeChecker::endVisit(BinaryOperation const& _operation) )) m_errorReporter.warning( _operation.location(), - "Result of " + operation + " has type " + commonType->toString() + " and thus " + "Result of " + operation + " has type" + quoteSpace(commonType->toString()) + "and thus " "might overflow. Silence this warning by converting the literal to the " "expected type." ); @@ -1567,10 +1570,10 @@ void TypeChecker::endVisit(BinaryOperation const& _operation) _operation.location(), "The result type of the " + operation + - " operation is equal to the type of the first operand (" + - commonType->toString() + + "operation is equal to the type of the first operand (" + + quote(commonType->toString()) + ") ignoring the (larger) type of the second operand (" + - rightType->toString() + + quote(rightType->toString()) + ") which might be unexpected. Silence this warning by either converting " "the first or the second operand to the type of the other." ); @@ -1651,15 +1654,15 @@ TypePointer TypeChecker::typeCheckTypeConversionAndRetrieveReturnType( ) ) ssl.append( - "Did you mean to declare this variable as \"address payable\"?", + "Did you mean to declare this variable as " + quote("address payable") + "?", variableDeclaration->location() ); m_errorReporter.typeError( _functionCall.location(), ssl, - "Explicit type conversion not allowed from non-payable \"address\" to \"" + - resultType->toString() + - "\", which has a payable fallback function." + "Explicit type conversion not allowed from non-payable" + quoteSpace("address") + "to " + + quote(resultType->toString()) + + ", which has a payable fallback function." ); } else if ( @@ -1670,21 +1673,19 @@ TypePointer TypeChecker::typeCheckTypeConversionAndRetrieveReturnType( ) m_errorReporter.typeError( _functionCall.location(), - "Explicit type conversion not allowed from \"" + - argType->toString() + - "\" to \"" + - resultType->toString() + - "\". To obtain the address of the contract of the function, " + - "you can use the .address member of the function." + "Explicit type conversion not allowed from" + quoteSpace(argType->toString()) + "to " + + quote(resultType->toString()) + + ". To obtain the address of the contract of the function, " + + "you can use the" + quoteSpace(".address") + "member of the function." ); else m_errorReporter.typeError( _functionCall.location(), - "Explicit type conversion not allowed from \"" + - argType->toString() + - "\" to \"" + - resultType->toString() + - "\"." + "Explicit type conversion not allowed from" + + quoteSpace(argType->toString()) + + "to " + + quote(resultType->toString()) + + "." ); } if (auto addressType = dynamic_cast(resultType)) @@ -1716,14 +1717,14 @@ void TypeChecker::typeCheckFunctionCall( ) m_errorReporter.typeError( _functionCall.location(), - "\"staticcall\" is not supported by the VM version." + quote("staticcall") + " is not supported by the VM version." ); // Check for event outside of emit statement if (!m_insideEmitStatement && _functionType->kind() == FunctionType::Kind::Event) m_errorReporter.typeError( _functionCall.location(), - "Event invocations have to be prefixed by \"emit\"." + "Event invocations have to be prefixed by " + quote("emit") + "." ); // Perform standard function call type checking @@ -1739,16 +1740,16 @@ void TypeChecker::typeCheckFallbackFunction(FunctionDefinition const& _function) if (_function.stateMutability() != StateMutability::NonPayable && _function.stateMutability() != StateMutability::Payable) m_errorReporter.typeError( _function.location(), - "Fallback function must be payable or non-payable, but is \"" + - stateMutabilityToString(_function.stateMutability()) + - "\"." + "Fallback function must be payable or non-payable, but is " + + quote(stateMutabilityToString(_function.stateMutability())) + + "." ); if (_function.visibility() != Visibility::External) - m_errorReporter.typeError(_function.location(), "Fallback function must be defined as \"external\"."); + m_errorReporter.typeError(_function.location(), "Fallback function must be defined as " + quote("external") + "."); if (!_function.returnParameters().empty()) { if (_function.returnParameters().size() > 1 || *type(*_function.returnParameters().front()) != *TypeProvider::bytesMemory()) - m_errorReporter.typeError(_function.returnParameterList()->location(), "Fallback function can only have a single \"bytes memory\" return value."); + m_errorReporter.typeError(_function.returnParameterList()->location(), "Fallback function can only have a single" + quoteSpace("bytes memory") + "return value."); else m_errorReporter.typeError(_function.returnParameterList()->location(), "Return values for fallback functions are not yet implemented."); } @@ -1766,12 +1767,12 @@ void TypeChecker::typeCheckReceiveFunction(FunctionDefinition const& _function) if (_function.stateMutability() != StateMutability::Payable) m_errorReporter.typeError( _function.location(), - "Receive ether function must be payable, but is \"" + - stateMutabilityToString(_function.stateMutability()) + - "\"." + "Receive ether function must be" + quoteSpace("payable") + "but is " + + quote(stateMutabilityToString(_function.stateMutability())) + + "." ); if (_function.visibility() != Visibility::External) - m_errorReporter.typeError(_function.location(), "Receive ether function must be defined as \"external\"."); + m_errorReporter.typeError(_function.location(), "Receive ether function must be defined as " + quote("external") + "."); if (!_function.returnParameters().empty()) m_errorReporter.typeError(_function.returnParameterList()->location(), "Receive ether function cannot return values."); if (!_function.parameters().empty()) @@ -1783,13 +1784,13 @@ void TypeChecker::typeCheckConstructor(FunctionDefinition const& _function) { solAssert(_function.isConstructor(), ""); if (!_function.returnParameters().empty()) - m_errorReporter.typeError(_function.returnParameterList()->location(), "Non-empty \"returns\" directive for constructor."); + m_errorReporter.typeError(_function.returnParameterList()->location(), "Non-empty" + quoteSpace("returns") + "directive for constructor."); if (_function.stateMutability() != StateMutability::NonPayable && _function.stateMutability() != StateMutability::Payable) m_errorReporter.typeError( _function.location(), - "Constructor must be payable or non-payable, but is \"" + - stateMutabilityToString(_function.stateMutability()) + - "\"." + "Constructor must be payable or non-payable, but is " + + quote(stateMutabilityToString(_function.stateMutability())) + + "." ); if (_function.visibility() != Visibility::Public && _function.visibility() != Visibility::Internal) m_errorReporter.typeError(_function.location(), "Constructor must be public or internal."); @@ -1949,7 +1950,8 @@ void TypeChecker::typeCheckFunctionGeneralChecks( { msg += " Members that have to be skipped in memory:"; for (auto const& member: membersRemovedForStructConstructor) - msg += " " + member; + msg += " " + quote(member); + msg += "."; } } else if ( @@ -1966,8 +1968,8 @@ void TypeChecker::typeCheckFunctionGeneralChecks( else msg += " This function requires a single bytes argument." - " If all your arguments are value types, you can use" - " abi.encode(...) to properly generate it."; + " If all your arguments are value types, you can use" + + quoteSpace("abi.encode(...)") + "to properly generate it."; } else if ( _functionType->kind() == FunctionType::Kind::KECCAK256 || @@ -1977,7 +1979,7 @@ void TypeChecker::typeCheckFunctionGeneralChecks( msg += " This function requires a single bytes argument." " Use abi.encodePacked(...) to obtain the pre-0.5.0" - " behaviour or abi.encode(...) to use ABI encoding."; + " behaviour or" + quoteSpace("abi.encode(...)") + "to use ABI encoding."; m_errorReporter.typeError(_functionCall.location(), msg); return; } @@ -2008,7 +2010,7 @@ void TypeChecker::typeCheckFunctionGeneralChecks( duplication = true; m_errorReporter.typeError( arguments[i]->location(), - "Duplicate named argument \"" + *argumentNames[i] + "\"." + "Duplicate named argument " + quote(*argumentNames[i]) + "." ); } if (duplication) @@ -2034,9 +2036,9 @@ void TypeChecker::typeCheckFunctionGeneralChecks( not_all_mapped = true; m_errorReporter.typeError( _functionCall.location(), - "Named argument \"" + - *argumentNames[i] + - "\" does not match function declaration." + "Named argument" + + quoteSpace(*argumentNames[i]) + + "does not match function declaration." ); } } @@ -2054,10 +2056,10 @@ void TypeChecker::typeCheckFunctionGeneralChecks( { string msg = "Invalid type for argument in function call. " - "Invalid implicit conversion from " + - type(*paramArgMap[i])->toString() + - " to " + - parameterTypes[i]->toString() + + "Invalid implicit conversion from" + + quoteSpace(type(*paramArgMap[i])->toString()) + + "to " + + quote(parameterTypes[i]->toString()) + " requested."; if ( _functionType->kind() == FunctionType::Kind::BareCall || @@ -2066,18 +2068,18 @@ void TypeChecker::typeCheckFunctionGeneralChecks( _functionType->kind() == FunctionType::Kind::BareStaticCall ) msg += - " This function requires a single bytes argument." + " This function requires a single" + quoteSpace("bytes") + "argument." " If all your arguments are value types, you can" - " use abi.encode(...) to properly generate it."; + " use" + quoteSpace("abi.encode(...)") + "to properly generate it."; else if ( _functionType->kind() == FunctionType::Kind::KECCAK256 || _functionType->kind() == FunctionType::Kind::SHA256 || _functionType->kind() == FunctionType::Kind::RIPEMD160 ) msg += - " This function requires a single bytes argument." - " Use abi.encodePacked(...) to obtain the pre-0.5.0" - " behaviour or abi.encode(...) to use ABI encoding."; + " This function requires a single" + quoteSpace("bytes") + "argument." + " Use" + quoteSpace("abi.encodePacked(...)") + "to obtain the pre-0.5.0" + " behaviour or" + quoteSpace("abi.encode(...)") + "to use ABI encoding."; m_errorReporter.typeError(paramArgMap[i]->location(), msg); } } @@ -2327,13 +2329,13 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess) if (!storageType->members(m_scope).membersByName(memberName).empty()) m_errorReporter.fatalTypeError( _memberAccess.location(), - "Member \"" + memberName + "\" is not available in " + - exprType->toString() + - " outside of storage." + "Member" + quoteSpace(memberName) + "is not available in" + + quoteSpace(exprType->toString()) + + "outside of storage." ); } - string errorMsg = "Member \"" + memberName + "\" not found or not visible " - "after argument-dependent lookup in " + exprType->toString() + "."; + string errorMsg = "Member" + quoteSpace(memberName) + "not found or not visible " + "after argument-dependent lookup in " + quote(exprType->toString()) + "."; if (auto const& funType = dynamic_cast(exprType)) { @@ -2342,14 +2344,14 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess) if (memberName == "value") { if (funType->kind() == FunctionType::Kind::Creation) - errorMsg = "Constructor for " + t.front()->toString() + " must be payable for member \"value\" to be available."; + errorMsg = "Constructor for" + quoteSpace(t.front()->toString()) + "must be payable for member" + quoteSpace("value") + "to be available."; else if ( funType->kind() == FunctionType::Kind::DelegateCall || funType->kind() == FunctionType::Kind::BareDelegateCall ) - errorMsg = "Member \"value\" is not allowed in delegated calls due to \"msg.value\" persisting."; + errorMsg = "Member" + quoteSpace("value") + "is not allowed in delegated calls due to" + quoteSpace("msg.value") + "persisting."; else - errorMsg = "Member \"value\" is only available for payable functions."; + errorMsg = "Member" + quoteSpace("value") + "is only available for payable functions."; } else if ( t.size() == 1 && @@ -2365,7 +2367,7 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess) { Identifier const* var = dynamic_cast(&_memberAccess.expression()); string varName = var ? var->name() : "..."; - errorMsg += " Use \"address(" + varName + ")." + memberName + "\" to access this address member."; + errorMsg += " Use" + quoteSpace("address(" + varName + ")." + memberName) + "to access this address member."; break; } } @@ -2379,7 +2381,7 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess) "Expected address not-payable as members were not found" ); - errorMsg = "\"send\" and \"transfer\" are only available for objects of type \"address payable\", not \"" + exprType->toString() + "\"."; + errorMsg = quote("send") + " and" + quoteSpace("transfer") + "are only available for objects of type " + quote("address payable") + ", not " + quote(exprType->toString()) + "."; } } @@ -2391,9 +2393,9 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess) else if (possibleMembers.size() > 1) m_errorReporter.fatalTypeError( _memberAccess.location(), - "Member \"" + memberName + "\" not unique " - "after argument-dependent lookup in " + exprType->toString() + - (memberName == "value" ? " - did you forget the \"payable\" modifier?" : ".") + "Member" + quoteSpace(memberName) + "not unique " + "after argument-dependent lookup in " + quote(exprType->toString()) + + (memberName == "value" ? " - did you forget the" + quoteSpace("payable") + "modifier?" : ".") ); annotation.referencedDeclaration = possibleMembers.front().declaration; @@ -2550,7 +2552,7 @@ bool TypeChecker::visit(IndexAccess const& _access) default: m_errorReporter.fatalTypeError( _access.baseExpression().location(), - "Indexed expression has to be a type, mapping or array (is " + baseType->toString() + ")" + "Indexed expression has to be a type, mapping or array (is " + quote(baseType->toString()) + ")." ); } _access.annotation().type = resultType; @@ -2695,12 +2697,12 @@ bool TypeChecker::visit(Identifier const& _identifier) if (_identifier.name() == "sha3" && fType->kind() == FunctionType::Kind::KECCAK256) m_errorReporter.typeError( _identifier.location(), - "\"sha3\" has been deprecated in favour of \"keccak256\"." + quote("sha3") + " has been deprecated in favour of " + quote("keccak256") + "." ); else if (_identifier.name() == "suicide" && fType->kind() == FunctionType::Kind::Selfdestruct) m_errorReporter.typeError( _identifier.location(), - "\"suicide\" has been deprecated in favour of \"selfdestruct\"." + quote("suicide") + " has been deprecated in favour of " + quote("selfdestruct") + "." ); } @@ -2740,14 +2742,14 @@ void TypeChecker::endVisit(Literal const& _literal) { msg = "This looks like an address but has an invalid checksum."; if (!_literal.getChecksummedAddress().empty()) - msg += " Correct checksummed address: \"" + _literal.getChecksummedAddress() + "\"."; + msg += " Correct checksummed address: " + quote(_literal.getChecksummedAddress()) + "."; } if (!msg.empty()) m_errorReporter.syntaxError( _literal.location(), msg + - " If this is not used as an address, please prepend '00'. " + + " 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" ); } @@ -2756,13 +2758,13 @@ void TypeChecker::endVisit(Literal const& _literal) m_errorReporter.fatalTypeError( _literal.location(), "Hexadecimal numbers cannot be used with unit denominations. " - "You can use an expression of the form \"0x1234 * 1 day\" instead." + "You can use an expression of the form" + quoteSpace("0x1234 * 1 day") + "instead." ); if (_literal.subDenomination() == Literal::SubDenomination::Year) m_errorReporter.typeError( _literal.location(), - "Using \"years\" as a unit denomination is deprecated." + "Using" + quoteSpace("years") + "as a unit denomination is deprecated." ); if (!_literal.annotation().type) @@ -2807,10 +2809,10 @@ bool TypeChecker::expectType(Expression const& _expression, Type const& _expecte _expression.accept(*this); if (!type(_expression)->isImplicitlyConvertibleTo(_expectedType)) { - auto errorMsg = "Type " + - type(_expression)->toString() + - " is not implicitly convertible to expected type " + - _expectedType.toString(); + auto errorMsg = "Type" + + quoteSpace(type(_expression)->toString()) + + "is not implicitly convertible to expected type " + + quote(_expectedType.toString()); if ( type(_expression)->category() == Type::Category::RationalNumber && dynamic_cast(type(_expression))->isFractional() && @@ -2826,9 +2828,9 @@ bool TypeChecker::expectType(Expression const& _expression, Type const& _expecte m_errorReporter.typeError( _expression.location(), errorMsg + - ". Try converting to type " + - type(_expression)->mobileType()->toString() + - " or use an explicit conversion." + ". Try converting to type" + + quoteSpace(type(_expression)->mobileType()->toString()) + + "or use an explicit conversion." ); } else @@ -2846,6 +2848,8 @@ void TypeChecker::requireLValue(Expression const& _expression) if (_expression.annotation().isLValue) return; + string errMsg; + return m_errorReporter.typeError(_expression.location(), [&]() { if (_expression.annotation().isConstant) return "Cannot assign to a constant variable."; @@ -2868,7 +2872,7 @@ void TypeChecker::requireLValue(Expression const& _expression) } else if (dynamic_cast(type(memberAccess->expression()))) if (memberAccess->memberName() == "length") - return "Member \"length\" is read-only and cannot be used to resize arrays."; + return (errMsg = string("Member") + quoteSpace("length") + string("is read-only and cannot be used to resize arrays.")).c_str(); } if (auto identifier = dynamic_cast(&_expression)) diff --git a/libsolidity/analysis/ViewPureChecker.cpp b/libsolidity/analysis/ViewPureChecker.cpp index 073e453be..652813fc6 100644 --- a/libsolidity/analysis/ViewPureChecker.cpp +++ b/libsolidity/analysis/ViewPureChecker.cpp @@ -171,7 +171,8 @@ void ViewPureChecker::endVisit(FunctionDefinition const& _funDef) ) m_errorReporter.warning( _funDef.location(), - "Function state mutability can be restricted to " + stateMutabilityToString(m_bestMutabilityAndLocation.mutability) + "Function state mutability can be restricted to " + quote(stateMutabilityToString(m_bestMutabilityAndLocation.mutability)) + + "." ); m_currentFunction = nullptr; } @@ -252,8 +253,8 @@ void ViewPureChecker::reportMutability( { m_errorReporter.typeError( _location, - "Function declared as pure, but this expression (potentially) reads from the " - "environment or state and thus requires \"view\"." + "Function declared as " + quote("pure") + ", but this expression (potentially) reads from the " + "environment or state and thus requires " + quote("view") + "." ); m_errors = true; } @@ -262,9 +263,9 @@ void ViewPureChecker::reportMutability( m_errorReporter.typeError( _location, "Function declared as " + - stateMutabilityToString(m_currentFunction->stateMutability()) + + quote(stateMutabilityToString(m_currentFunction->stateMutability())) + ", but this expression (potentially) modifies the state and thus " - "requires non-payable (the default) or payable." + "requires non-payable (the default) or " + quote("payable") + "." ); m_errors = true; } @@ -277,14 +278,14 @@ void ViewPureChecker::reportMutability( if (_nestedLocation) m_errorReporter.typeError( _location, - SecondarySourceLocation().append("\"msg.value\" or \"callvalue()\" appear here inside the modifier.", *_nestedLocation), - "This modifier uses \"msg.value\" or \"callvalue()\" and thus the function has to be payable or internal." + SecondarySourceLocation().append(quote("msg.value") + " or" + quoteSpace("callvalue()") + "appear here inside the modifier.", *_nestedLocation), + "This modifier uses" + quoteSpace("msg.value") + "or" + quoteSpace("callvalue()") + "and thus the function has to be" + quoteSpace("payable") + "or " + quote("internal") + "." ); else m_errorReporter.typeError( _location, - "\"msg.value\" and \"callvalue()\" can only be used in payable public functions. Make the function " - "\"payable\" or use an internal function to avoid this error." + quote("msg.value") + " and" + quoteSpace("callvalue()") + "can only be used in payable public functions. Make the function" + + quoteSpace("payable") + "or use an internal function to avoid this error." ); m_errors = true; } diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 4f596468b..ae9dcb60e 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -31,6 +31,8 @@ #include #include +#include + #include #include #include @@ -116,7 +118,7 @@ BoolResult fitsIntegerType(bigint const& _value, IntegerType const& _type) return BoolResult::err("Cannot implicitly convert signed literal to unsigned type."); if (_type.minValue() > _value || _value > _type.maxValue()) - return BoolResult::err("Literal is too large to fit in " + _type.toString(false) + "."); + return BoolResult::err("Literal is too large to fit in " + langutil::quote(_type.toString(false)) + "."); return true; } diff --git a/libsolidity/formal/SMTEncoder.cpp b/libsolidity/formal/SMTEncoder.cpp index 2c86eae0b..ca0b7090f 100644 --- a/libsolidity/formal/SMTEncoder.cpp +++ b/libsolidity/formal/SMTEncoder.cpp @@ -504,7 +504,7 @@ void SMTEncoder::endVisit(UnaryOperation const& _op) else m_errorReporter.warning( _op.location(), - "Assertion checker does not yet implement \"delete\" for this expression." + "Assertion checker does not yet implement" + quoteSpace("delete") + "for this expression." ); } break; @@ -785,7 +785,7 @@ void SMTEncoder::endVisit(Literal const& _literal) m_errorReporter.warning( _literal.location(), "Assertion checker does not yet support the type of this literal (" + - _literal.annotation().type->toString() + + quote(_literal.annotation().type->toString()) + ")." ); } @@ -1076,7 +1076,7 @@ void SMTEncoder::arithmeticOperation(BinaryOperation const& _op) else m_errorReporter.warning( _op.location(), - "Assertion checker does not yet implement this operator for type " + type->richIdentifier() + "." + "Assertion checker does not yet implement this operator for type " + quote(type->richIdentifier()) + "." ); } @@ -1167,7 +1167,7 @@ void SMTEncoder::compareOperation(BinaryOperation const& _op) else m_errorReporter.warning( _op.location(), - "Assertion checker does not yet implement the type " + _op.annotation().commonType->toString() + " for comparisons" + "Assertion checker does not yet implement the type" + quoteSpace(_op.annotation().commonType->toString()) + "for comparisons." ); } @@ -1195,7 +1195,7 @@ void SMTEncoder::booleanOperation(BinaryOperation const& _op) else m_errorReporter.warning( _op.location(), - "Assertion checker does not yet implement the type " + _op.annotation().commonType->toString() + " for boolean operations" + "Assertion checker does not yet implement the type" + quoteSpace(_op.annotation().commonType->toString()) + "for boolean operations." ); } @@ -1227,7 +1227,7 @@ void SMTEncoder::assignment( m_errorReporter.warning( _location, - "Assertion checker does not yet implement type " + _type->toString() + "Assertion checker does not yet implement type " + quote(_type->toString()) + "." ); } else if (auto varDecl = identifierToVariable(_left)) @@ -1488,7 +1488,7 @@ void SMTEncoder::createExpr(Expression const& _e) if (abstract) m_errorReporter.warning( _e.location(), - "Assertion checker does not yet implement type " + _e.annotation().type->toString() + "Assertion checker does not yet implement type " + quote(_e.annotation().type->toString()) + "." ); } diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 7c64d0df3..18db7e5a7 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -901,7 +901,7 @@ StringMap CompilerStack::loadMissingSources(SourceUnit const& _ast, std::string { m_errorReporter.parserError( import->location(), - string("Source \"" + importPath + "\" not found: " + result.responseOrErrorMessage) + string("Source" + quoteSpace(importPath) + "not found: " + result.responseOrErrorMessage) ); continue; } diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index 3a86914d1..d7f81e74e 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -322,11 +322,11 @@ Json::Value collectEVMObject(evmasm::LinkerObject const& _object, string const* std::optional checkKeys(Json::Value const& _input, set const& _keys, string const& _name) { if (!!_input && !_input.isObject()) - return formatFatalError("JSONError", "\"" + _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 \"" + member + "\""); + return formatFatalError("JSONError", "Unknown key " + quote(member)); return std::nullopt; } @@ -372,7 +372,7 @@ std::optional checkOptimizerDetail(Json::Value const& _details, std if (_details.isMember(_name)) { if (!_details[_name].isBool()) - return formatFatalError("JSONError", "\"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 +383,11 @@ std::optional checkMetadataKeys(Json::Value const& _input) if (_input.isObject()) { if (_input.isMember("useLiteralContent") && !_input["useLiteralContent"].isBool()) - return formatFatalError("JSONError", "\"settings.metadata.useLiteralContent\" must be Boolean"); + return formatFatalError("JSONError", quote("settings.metadata.useLiteralContent") + " must be Boolean"); static set hashes{"ipfs", "bzzr1", "none"}; if (_input.isMember("bytecodeHash") && !hashes.count(_input["bytecodeHash"].asString())) - return formatFatalError("JSONError", "\"settings.metadata.bytecodeHash\" must be \"ipfs\", \"bzzr1\" or \"none\""); + return formatFatalError("JSONError", quote("settings.metadata.bytecodeHash") + " must be " + quoteSpace("ipfs") + "," + quoteSpace("bzzr1") + "or " + quote("none")); } static set keys{"useLiteralContent", "bytecodeHash"}; return checkKeys(_input, keys, "settings.metadata"); @@ -396,7 +396,7 @@ std::optional checkMetadataKeys(Json::Value const& _input) std::optional checkOutputSelection(Json::Value const& _outputSelection) { if (!!_outputSelection && !_outputSelection.isObject()) - return formatFatalError("JSONError", "\"settings.outputSelection\" must be an object"); + return formatFatalError("JSONError", quote("settings.outputSelection") + " must be an object"); for (auto const& sourceName: _outputSelection.getMemberNames()) { @@ -405,7 +405,7 @@ std::optional checkOutputSelection(Json::Value const& _outputSelect if (!sourceVal.isObject()) return formatFatalError( "JSONError", - "\"settings.outputSelection." + sourceName + "\" must be an object" + quote("settings.outputSelection." + sourceName) + " must be an object" ); for (auto const& contractName: sourceVal.getMemberNames()) @@ -415,22 +415,26 @@ std::optional checkOutputSelection(Json::Value const& _outputSelect if (!contractVal.isArray()) return formatFatalError( "JSONError", - "\"settings.outputSelection." + - sourceName + - "." + - contractName + - "\" must be a string array" + quote( + "settings.outputSelection." + + sourceName + + "." + + contractName + ) + + " must be a string array" ); for (auto const& output: contractVal) if (!output.isString()) return formatFatalError( "JSONError", - "\"settings.outputSelection." + - sourceName + - "." + - contractName + - "\" must be a string array" + quote( + "settings.outputSelection." + + sourceName + + "." + + contractName + ) + + " must be a string array" ); } } @@ -449,7 +453,7 @@ boost::variant parseOptimizerSettings(Json::Valu if (_jsonInput.isMember("enabled")) { if (!_jsonInput["enabled"].isBool()) - return formatFatalError("JSONError", "The \"enabled\" setting must be a Boolean."); + return formatFatalError("JSONError", "The" + quoteSpace("enabled") + "setting must be a Boolean."); settings = _jsonInput["enabled"].asBool() ? OptimiserSettings::standard() : OptimiserSettings::minimal(); } @@ -457,7 +461,7 @@ boost::variant parseOptimizerSettings(Json::Valu if (_jsonInput.isMember("runs")) { if (!_jsonInput["runs"].isUInt()) - return formatFatalError("JSONError", "The \"runs\" setting must be an unsigned number."); + return formatFatalError("JSONError", "The" + quoteSpace("runs") + "setting must be an unsigned number."); settings.expectedExecutionsPerDeployment = _jsonInput["runs"].asUInt(); } @@ -485,7 +489,7 @@ boost::variant parseOptimizerSettings(Json::Valu if (details.isMember("yulDetails")) { if (!settings.runYulOptimiser) - return formatFatalError("JSONError", "\"Providing yulDetails requires Yul optimizer to be enabled."); + return formatFatalError("JSONError", "Providing" + quoteSpace("yulDetails") + "requires Yul optimizer to be enabled."); if (auto result = checkKeys(details["yulDetails"], {"stackAllocation"}, "settings.optimizer.details.yulDetails")) return *result; @@ -513,7 +517,7 @@ boost::variant StandardCompile Json::Value const& sources = _input["sources"]; if (!sources.isObject() && !sources.isNull()) - return formatFatalError("JSONError", "\"sources\" is not a JSON object."); + return formatFatalError("JSONError", quote("sources") + " is not a JSON object."); if (sources.empty()) return formatFatalError("JSONError", "No input sources specified."); @@ -538,7 +542,7 @@ boost::variant StandardCompile false, "IOError", "general", - "Mismatch between content and supplied hash for \"" + sourceName + "\"" + "Mismatch between content and supplied hash for " + quote(sourceName) )); else ret.sources[sourceName] = content; @@ -563,7 +567,7 @@ boost::variant StandardCompile false, "IOError", "general", - "Mismatch between content and supplied hash for \"" + sourceName + "\" at \"" + url.asString() + "\"" + "Mismatch between content and supplied hash for" + quoteSpace(sourceName) + "at " + quote(url.asString()) )); else { @@ -573,7 +577,7 @@ boost::variant StandardCompile } } else - failures.push_back("Cannot import url (\"" + url.asString() + "\"): " + result.responseOrErrorMessage); + failures.push_back("Cannot import url (" + quote(url.asString()) + "): " + result.responseOrErrorMessage + "."); } for (auto const& failure: failures) @@ -602,7 +606,7 @@ boost::variant StandardCompile if (!!smtlib2Responses) { if (!smtlib2Responses.isObject()) - return formatFatalError("JSONError", "\"auxiliaryInput.smtlib2responses\" must be an object."); + return formatFatalError("JSONError", quote("auxiliaryInput.smtlib2responses") + " must be an object."); for (auto const& hashString: smtlib2Responses.getMemberNames()) { @@ -619,7 +623,7 @@ boost::variant StandardCompile if (!smtlib2Responses[hashString].isString()) return formatFatalError( "JSONError", - "\"smtlib2Responses." + hashString + "\" must be a string." + quote("smtlib2Responses." + hashString) + " must be a string." ); ret.smtLib2Responses[hash] = smtlib2Responses[hashString].asString(); @@ -635,14 +639,14 @@ boost::variant StandardCompile if (settings.isMember("parserErrorRecovery")) { if (!settings["parserErrorRecovery"].isBool()) - return formatFatalError("JSONError", "\"settings.parserErrorRecovery\" must be a Boolean."); + return formatFatalError("JSONError", quote("settings.parserErrorRecovery") + " must be a Boolean."); ret.parserErrorRecovery = settings["parserErrorRecovery"].asBool(); } if (settings.isMember("evmVersion")) { if (!settings["evmVersion"].isString()) - return formatFatalError("JSONError", "evmVersion must be a string."); + return formatFatalError("JSONError", quote("evmVersion") + " must be a string."); std::optional version = langutil::EVMVersion::fromString(settings["evmVersion"].asString()); if (!version) return formatFatalError("JSONError", "Invalid EVM version requested."); @@ -657,30 +661,30 @@ boost::variant StandardCompile if (settings["debug"].isMember("revertStrings")) { if (!settings["debug"]["revertStrings"].isString()) - return formatFatalError("JSONError", "settings.debug.revertStrings must be a string."); + return formatFatalError("JSONError", quote("settings.debug.revertStrings") + " must be a string."); std::optional revertStrings = revertStringsFromString(settings["debug"]["revertStrings"].asString()); if (!revertStrings) - return formatFatalError("JSONError", "Invalid value for settings.debug.revertStrings."); + return formatFatalError("JSONError", "Invalid value for " + quote("settings.debug.revertStrings") + "."); if (*revertStrings != RevertStrings::Default && *revertStrings != RevertStrings::Strip) return formatFatalError( "UnimplementedFeatureError", - "Only \"default\" and \"strip\" are implemented for settings.debug.revertStrings for now." + "Only" + quoteSpace("default") + "and" + quoteSpace("strip") + "are implemented for" + quoteSpace("settings.debug.revertStrings") + "for now." ); ret.revertStrings = *revertStrings; } } if (settings.isMember("remappings") && !settings["remappings"].isArray()) - return formatFatalError("JSONError", "\"settings.remappings\" must be an array of strings."); + return formatFatalError("JSONError", quote("settings.remappings") + " must be an array of strings."); for (auto const& remapping: settings.get("remappings", Json::Value())) { if (!remapping.isString()) - return formatFatalError("JSONError", "\"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: \"" + remapping.asString() + "\""); + return formatFatalError("JSONError", "Invalid remapping: " + quote(remapping.asString())); } if (settings.isMember("optimizer")) @@ -694,7 +698,7 @@ boost::variant StandardCompile Json::Value jsonLibraries = settings.get("libraries", Json::Value(Json::objectValue)); if (!jsonLibraries.isObject()) - return formatFatalError("JSONError", "\"libraries\" is not a JSON object."); + return formatFatalError("JSONError", quote("libraries") + " is not a JSON object."); for (auto const& sourceName: jsonLibraries.getMemberNames()) { auto const& jsonSourceName = jsonLibraries[sourceName]; @@ -709,7 +713,7 @@ boost::variant StandardCompile if (!boost::starts_with(address, "0x")) return formatFatalError( "JSONError", - "Library address is not prefixed with \"0x\"." + "Library address is not prefixed with " + quote("0x") + "." ); if (address.length() != 42) @@ -727,7 +731,7 @@ boost::variant StandardCompile { return formatFatalError( "JSONError", - "Invalid library address (\"" + address + "\") supplied." + "Invalid library address (" + quote(address) + ") supplied." ); } } @@ -1021,11 +1025,11 @@ Json::Value StandardCompiler::compileYul(InputsAndSettings _inputsAndSettings) if (!_inputsAndSettings.smtLib2Responses.empty()) return formatFatalError("JSONError", "Yul mode does not support smtlib2responses."); if (!_inputsAndSettings.remappings.empty()) - return formatFatalError("JSONError", "Field \"settings.remappings\" cannot be used for Yul."); + return formatFatalError("JSONError", "Field" + quoteSpace("settings.remappings") + "cannot be used for Yul."); if (!_inputsAndSettings.libraries.empty()) - return formatFatalError("JSONError", "Field \"settings.libraries\" cannot be used for Yul."); + return formatFatalError("JSONError", "Field" + quoteSpace("settings.libraries") + "cannot be used for Yul."); if (_inputsAndSettings.revertStrings != RevertStrings::Default) - return formatFatalError("JSONError", "Field \"settings.debug.revertStrings\" cannot be used for Yul."); + return formatFatalError("JSONError", "Field" + quoteSpace("settings.debug.revertStrings") + "cannot be used for Yul."); Json::Value output = Json::objectValue; @@ -1107,7 +1111,7 @@ Json::Value StandardCompiler::compile(Json::Value const& _input) noexcept else if (settings.language == "Yul") return compileYul(std::move(settings)); else - return formatFatalError("JSONError", "Only \"Solidity\" or \"Yul\" is supported as a language."); + return formatFatalError("JSONError", "Only" + quoteSpace("Solidity") + "or" + quoteSpace("Yul") + "is supported as a language."); } catch (Json::LogicError const& _exception) { diff --git a/libsolidity/parsing/DocStringParser.cpp b/libsolidity/parsing/DocStringParser.cpp index fb1468197..edca94656 100644 --- a/libsolidity/parsing/DocStringParser.cpp +++ b/libsolidity/parsing/DocStringParser.cpp @@ -97,7 +97,7 @@ bool DocStringParser::parse(string const& _docString, ErrorReporter& _errorRepor auto tagNameEndPos = firstWhitespaceOrNewline(tagPos, end); if (tagNameEndPos == end) { - appendError("End of tag " + string(tagPos, tagNameEndPos) + " not found"); + appendError("End of tag" + quoteSpace(string(tagPos, tagNameEndPos)) + "not found."); break; } @@ -151,7 +151,7 @@ DocStringParser::iter DocStringParser::parseDocTagParam(iter _pos, iter _end) if (descStartPos == nlPos) { - appendError("No description given for param " + paramName); + appendError("No description given for param " + quote(paramName) + "."); return _end; } diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index 96c70e293..5d7d828ed 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -226,11 +226,11 @@ ASTPointer Parser::parseImportDirective() unitAlias = expectIdentifierToken(); } else - fatalParserError("Expected string literal (path), \"*\" or alias list."); + fatalParserError("Expected string literal (path)," + quoteSpace("*") + "or alias list."); // "from" is not a keyword but parsed as an identifier because of backwards // compatibility and because it is a really common word. if (m_scanner->currentToken() != Token::Identifier || m_scanner->currentLiteral() != "from") - fatalParserError("Expected \"from\"."); + fatalParserError("Expected " + quote("from") + "."); m_scanner->next(); if (m_scanner->currentToken() != Token::StringLiteral) fatalParserError("Expected import path."); @@ -448,8 +448,8 @@ StateMutability Parser::parseStateMutability() case Token::Constant: stateMutability = StateMutability::View; parserError( - "The state mutability modifier \"constant\" was removed in version 0.5.0. " - "Use \"view\" or \"pure\" instead." + "The state mutability modifier" + quoteSpace("constant") + "was removed in version 0.5.0. " + "Use" + quoteSpace("view") + "or" + quoteSpace("pure") + "instead." ); break; default: @@ -481,9 +481,9 @@ Parser::FunctionHeaderParserResult Parser::parseFunctionHeader(bool _isStateVari if (_isStateVariable && (result.visibility == Visibility::External || result.visibility == Visibility::Internal)) break; parserError(string( - "Visibility already specified as \"" + - Declaration::visibilityToString(result.visibility) + - "\"." + "Visibility already specified as " + + quote(Declaration::visibilityToString(result.visibility)) + + "." )); m_scanner->next(); } @@ -495,9 +495,9 @@ Parser::FunctionHeaderParserResult Parser::parseFunctionHeader(bool _isStateVari if (result.stateMutability != StateMutability::NonPayable) { parserError(string( - "State mutability already specified as \"" + - stateMutabilityToString(result.stateMutability) + - "\"." + "State mutability already specified as " + + quote(stateMutabilityToString(result.stateMutability)) + + "." )); m_scanner->next(); } @@ -559,9 +559,9 @@ ASTPointer Parser::parseFunctionDefinition() }.at(m_scanner->currentToken()); name = make_shared(TokenTraits::toString(m_scanner->currentToken())); string message{ - "This function is named \"" + *name + "\" but is not the " + expected + " of the contract. " - "If you intend this to be a " + expected + ", use \"" + *name + "(...) { ... }\" without " - "the \"function\" keyword to define it." + "This function is named" + quoteSpace(*name) + "but is not the " + expected + " of the contract. " + "If you intend this to be a " + expected + ", use" + quoteSpace(*name + "(...) { ... }") + "without " + + "the" + quoteSpace("function") + "keyword to define it." }; if (m_scanner->currentToken() == Token::Constructor) parserError(message); @@ -647,10 +647,10 @@ ASTPointer Parser::parseEnumDefinition() break; expectToken(Token::Comma); if (m_scanner->currentToken() != Token::Identifier) - fatalParserError(string("Expected identifier after ','")); + fatalParserError(string("Expected identifier after " + quote(",") + ".")); } if (members.empty()) - parserError({"enum with no members is not allowed."}); + parserError({quote("enum") + " with no members is not allowed."}); nodeFactory.markEndPosition(); expectToken(Token::RBrace); @@ -678,8 +678,8 @@ ASTPointer Parser::parseVariableDeclaration( if (dynamic_cast(type.get()) && _options.isStateVariable && m_scanner->currentToken() == Token::LBrace) fatalParserError( "Expected a state variable declaration. If you intended this as a fallback function " - "or a function to handle plain ether transactions, use the \"fallback\" keyword " - "or the \"ether\" keyword instead." + "or a function to handle plain ether transactions, use the" + quoteSpace("fallback") + "keyword " + "or the" + quoteSpace("ether") + "keyword instead." ); bool isIndexed = false; @@ -698,9 +698,9 @@ ASTPointer Parser::parseVariableDeclaration( if (visibility != Visibility::Default) { parserError(string( - "Visibility already specified as \"" + - Declaration::visibilityToString(visibility) + - "\"." + "Visibility already specified as " + + quote(Declaration::visibilityToString(visibility)) + + "." )); m_scanner->next(); } @@ -1182,7 +1182,7 @@ ASTPointer Parser::parseInlineAssembly(ASTPointer con if (m_scanner->currentToken() == Token::StringLiteral) { if (m_scanner->currentLiteral() != "evmasm") - fatalParserError("Only \"evmasm\" supported."); + fatalParserError("Only" + quoteSpace("evmasm") + "supported."); // This can be used in the future to set the dialect. m_scanner->next(); } diff --git a/libyul/AsmAnalysis.cpp b/libyul/AsmAnalysis.cpp index 3f82b169f..1fb8de1a0 100644 --- a/libyul/AsmAnalysis.cpp +++ b/libyul/AsmAnalysis.cpp @@ -127,7 +127,7 @@ bool AsmAnalyzer::operator()(Identifier const& _identifier) { m_errorReporter.declarationError( _identifier.location, - "Variable " + _identifier.name.str() + " used before it was declared." + "Variable" + quoteSpace(_identifier.name.str()) + "used before it was declared." ); success = false; } @@ -141,7 +141,7 @@ bool AsmAnalyzer::operator()(Identifier const& _identifier) { m_errorReporter.typeError( _identifier.location, - "Function " + _identifier.name.str() + " used without being called." + "Function" + quoteSpace(_identifier.name.str()) + "used without being called." ); success = false; } @@ -180,7 +180,7 @@ bool AsmAnalyzer::operator()(ExpressionStatement const& _statement) to_string(m_stackHeight - initialStackHeight) + " value" + (m_stackHeight - initialStackHeight == 1 ? "" : "s") + - "). Use ``pop()`` or assign them."; + "). Use" + quoteSpace("pop()") + "or assign them."; m_errorReporter.error(Error::Type::TypeError, _statement.location, msg); success = false; } @@ -350,7 +350,7 @@ bool AsmAnalyzer::operator()(FunctionCall const& _funCall) else if (!m_dataNames.count(std::get(arg).value)) m_errorReporter.typeError( _funCall.functionName.location, - "Unknown data object \"" + std::get(arg).value.str() + "\"." + "Unknown data object " + quote(std::get(arg).value.str()) + "." ); } } @@ -558,7 +558,7 @@ bool AsmAnalyzer::expectDeposit(int _deposit, int _oldHeight, SourceLocation con { m_errorReporter.typeError( _location, - "Expected expression to return one item to the stack, but did return " + + "Expected expression to return one item to the stack, but it returned " + to_string(m_stackHeight - _oldHeight) + " items." ); @@ -585,7 +585,7 @@ bool AsmAnalyzer::checkAssignment(Identifier const& _variable, size_t _valueSize { m_errorReporter.declarationError( _variable.location, - "Variable " + _variable.name.str() + " used before it was declared." + "Variable" + quoteSpace(_variable.name.str()) + "used before it was declared." ); success = false; } @@ -638,7 +638,7 @@ void AsmAnalyzer::expectValidType(string const& type, SourceLocation const& _loc if (!builtinTypes.count(type)) m_errorReporter.typeError( _location, - "\"" + type + "\" is not a valid type (user defined types are not yet supported)." + quote(type) + " is not a valid type (user defined types are not yet supported)." ); } @@ -663,14 +663,14 @@ bool AsmAnalyzer::warnOnInstructions(evmasm::Instruction _instr, SourceLocation auto errorForVM = [=](string const& vmKindMessage) { m_errorReporter.typeError( _location, - "The \"" + - boost::to_lower_copy(instructionInfo(_instr).name) - + "\" instruction is " + + "The" + + quoteSpace(boost::to_lower_copy(instructionInfo(_instr).name)) + + "instruction is " + vmKindMessage + " VMs " + - " (you are currently compiling for \"" + - m_evmVersion.name() + - "\")." + " (you are currently compiling for " + + quote(m_evmVersion.name()) + + ")." ); }; @@ -720,7 +720,7 @@ bool AsmAnalyzer::warnOnInstructions(evmasm::Instruction _instr, SourceLocation _location, "Jump instructions and labels are low-level EVM features that can lead to " "incorrect stack access. Because of that they are disallowed in strict assembly. " - "Use functions, \"switch\", \"if\" or \"for\" statements instead." + "Use functions, " + quote("switch") + "," + quoteSpace("if") + "or" + quoteSpace("for") + "statements instead." ); } else diff --git a/libyul/AsmParser.cpp b/libyul/AsmParser.cpp index ac9ccce76..8efbd6b02 100644 --- a/libyul/AsmParser.cpp +++ b/libyul/AsmParser.cpp @@ -151,7 +151,7 @@ Statement Parser::parseStatement() { Statement stmt{createWithLocation()}; if (!m_insideFunction) - m_errorReporter.syntaxError(location(), "Keyword \"leave\" can only be used inside a function."); + m_errorReporter.syntaxError(location(), "Keyword" + quoteSpace("leave") + "can only be used inside a function."); m_scanner->next(); return stmt; } @@ -184,17 +184,16 @@ Statement Parser::parseStatement() auto const token = currentToken() == Token::Comma ? "," : ":="; fatalParserError( - std::string("Variable name must precede \"") + - token + - "\"" + - (currentToken() == Token::Comma ? " in multiple assignment." : " in assignment.") + std::string("Variable name must precede") + + quoteSpace(token) + + (currentToken() == Token::Comma ? "in multiple assignment." : "in assignment.") ); } auto const& identifier = std::get(elementary); if (m_dialect.builtin(identifier.name)) - fatalParserError("Cannot assign to builtin function \"" + identifier.name.str() + "\"."); + fatalParserError("Cannot assign to builtin function " + quoteSpace(identifier.name.str()) + "."); variableNames.emplace_back(identifier); @@ -477,7 +476,7 @@ Expression Parser::parseCall(Parser::ElementaryOperation&& _initialOp) fatalParserError( m_dialect.flavour == AsmFlavour::Yul ? "Function name expected." : - "Assembly instruction or function name required in front of \"(\")" + "Assembly instruction or function name required in front of " + quoteSpace("()") + "." ); expectToken(Token::LParen); @@ -526,7 +525,7 @@ YulString Parser::expectAsmIdentifier() } if (m_dialect.builtin(name)) - fatalParserError("Cannot use builtin function name \"" + name.str() + "\" as identifier name."); + fatalParserError("Cannot use builtin function name" + quoteSpace(name.str()) + "as identifier name."); advance(); return name; } @@ -536,13 +535,13 @@ void Parser::checkBreakContinuePosition(string const& _which) switch (m_currentForLoopComponent) { case ForLoopComponent::None: - m_errorReporter.syntaxError(location(), "Keyword \"" + _which + "\" needs to be inside a for-loop body."); + m_errorReporter.syntaxError(location(), "Keyword" + quoteSpace(_which) + "needs to be inside a for-loop body."); break; case ForLoopComponent::ForLoopPre: - m_errorReporter.syntaxError(location(), "Keyword \"" + _which + "\" in for-loop init block is not allowed."); + m_errorReporter.syntaxError(location(), "Keyword" + quoteSpace(_which) + "in for-loop init block is not allowed."); break; case ForLoopComponent::ForLoopPost: - m_errorReporter.syntaxError(location(), "Keyword \"" + _which + "\" in for-loop post block is not allowed."); + m_errorReporter.syntaxError(location(), "Keyword" + quoteSpace(_which) + "in for-loop post block is not allowed."); break; case ForLoopComponent::ForLoopBody: break; diff --git a/libyul/AsmScopeFiller.cpp b/libyul/AsmScopeFiller.cpp index 3a8e548b8..b513f685d 100644 --- a/libyul/AsmScopeFiller.cpp +++ b/libyul/AsmScopeFiller.cpp @@ -142,7 +142,7 @@ bool ScopeFiller::registerVariable(TypedName const& _name, SourceLocation const& //@TODO secondary location m_errorReporter.declarationError( _location, - "Variable name " + _name.name.str() + " already taken in this scope." + "Variable name" + quoteSpace(_name.name.str()) + "already taken in this scope." ); return false; } @@ -162,7 +162,7 @@ bool ScopeFiller::registerFunction(FunctionDefinition const& _funDef) //@TODO secondary location m_errorReporter.declarationError( _funDef.location, - "Function name " + _funDef.name.str() + " already taken in this scope." + "Function name" + quoteSpace(_funDef.name.str()) + "already taken in this scope." ); return false; } diff --git a/test/cmdlineTests/output_selection_all_A1/output.json b/test/cmdlineTests/output_selection_all_A1/output.json index 86476fac9..9a207f95d 100644 --- a/test/cmdlineTests/output_selection_all_A1/output.json +++ b/test/cmdlineTests/output_selection_all_A1/output.json @@ -4,7 +4,7 @@ contract A1 { function a(uint x) public pure { assert(x > 0); } } contract A2 { ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":131,"file":"a.sol","start":0},"type":"Warning"},{"component":"general","formattedMessage":"b.sol:1:1: Warning: Source file does not specify required compiler version! contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } ^----------------------------------------------------------------------------------------------------------------------------^ -","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":126,"file":"b.sol","start":0},"type":"Warning"},{"component":"general","formattedMessage":"b.sol:1:15: Warning: Function state mutability can be restricted to pure +","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":126,"file":"b.sol","start":0},"type":"Warning"},{"component":"general","formattedMessage":"b.sol:1:15: Warning: Function state mutability can be restricted to \"pure\". contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } ^------------------------------------------^ -","message":"Function state mutability can be restricted to pure","severity":"warning","sourceLocation":{"end":58,"file":"b.sol","start":14},"type":"Warning"}],"sources":{"a.sol":{"id":0},"b.sol":{"id":1}}} +","message":"Function state mutability can be restricted to \"pure\".","severity":"warning","sourceLocation":{"end":58,"file":"b.sol","start":14},"type":"Warning"}],"sources":{"a.sol":{"id":0},"b.sol":{"id":1}}} diff --git a/test/cmdlineTests/output_selection_all_A2/output.json b/test/cmdlineTests/output_selection_all_A2/output.json index 38b5b86d4..1897c0eeb 100644 --- a/test/cmdlineTests/output_selection_all_A2/output.json +++ b/test/cmdlineTests/output_selection_all_A2/output.json @@ -4,7 +4,7 @@ contract A1 { function a(uint x) public pure { assert(x > 0); } } contract A2 { ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":131,"file":"a.sol","start":0},"type":"Warning"},{"component":"general","formattedMessage":"b.sol:1:1: Warning: Source file does not specify required compiler version! contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } ^----------------------------------------------------------------------------------------------------------------------------^ -","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":126,"file":"b.sol","start":0},"type":"Warning"},{"component":"general","formattedMessage":"b.sol:1:15: Warning: Function state mutability can be restricted to pure +","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":126,"file":"b.sol","start":0},"type":"Warning"},{"component":"general","formattedMessage":"b.sol:1:15: Warning: Function state mutability can be restricted to \"pure\". contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } ^------------------------------------------^ -","message":"Function state mutability can be restricted to pure","severity":"warning","sourceLocation":{"end":58,"file":"b.sol","start":14},"type":"Warning"}],"sources":{"a.sol":{"id":0},"b.sol":{"id":1}}} +","message":"Function state mutability can be restricted to \"pure\".","severity":"warning","sourceLocation":{"end":58,"file":"b.sol","start":14},"type":"Warning"}],"sources":{"a.sol":{"id":0},"b.sol":{"id":1}}} diff --git a/test/cmdlineTests/output_selection_all_blank/output.json b/test/cmdlineTests/output_selection_all_blank/output.json index fe1fcd09a..714cf2995 100644 --- a/test/cmdlineTests/output_selection_all_blank/output.json +++ b/test/cmdlineTests/output_selection_all_blank/output.json @@ -4,7 +4,7 @@ contract A1 { function a(uint x) public pure { assert(x > 0); } } contract A2 { ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":131,"file":"a.sol","start":0},"type":"Warning"},{"component":"general","formattedMessage":"b.sol:1:1: Warning: Source file does not specify required compiler version! contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } ^----------------------------------------------------------------------------------------------------------------------------^ -","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":126,"file":"b.sol","start":0},"type":"Warning"},{"component":"general","formattedMessage":"b.sol:1:15: Warning: Function state mutability can be restricted to pure +","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":126,"file":"b.sol","start":0},"type":"Warning"},{"component":"general","formattedMessage":"b.sol:1:15: Warning: Function state mutability can be restricted to \"pure\". contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } ^------------------------------------------^ -","message":"Function state mutability can be restricted to pure","severity":"warning","sourceLocation":{"end":58,"file":"b.sol","start":14},"type":"Warning"}],"sources":{"a.sol":{"id":0},"b.sol":{"id":1}}} +","message":"Function state mutability can be restricted to \"pure\".","severity":"warning","sourceLocation":{"end":58,"file":"b.sol","start":14},"type":"Warning"}],"sources":{"a.sol":{"id":0},"b.sol":{"id":1}}} diff --git a/test/cmdlineTests/output_selection_all_star/output.json b/test/cmdlineTests/output_selection_all_star/output.json index 29cb854b9..af19e0f1c 100644 --- a/test/cmdlineTests/output_selection_all_star/output.json +++ b/test/cmdlineTests/output_selection_all_star/output.json @@ -4,7 +4,7 @@ contract A1 { function a(uint x) public pure { assert(x > 0); } } contract A2 { ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":131,"file":"a.sol","start":0},"type":"Warning"},{"component":"general","formattedMessage":"b.sol:1:1: Warning: Source file does not specify required compiler version! contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } ^----------------------------------------------------------------------------------------------------------------------------^ -","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":126,"file":"b.sol","start":0},"type":"Warning"},{"component":"general","formattedMessage":"b.sol:1:15: Warning: Function state mutability can be restricted to pure +","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":126,"file":"b.sol","start":0},"type":"Warning"},{"component":"general","formattedMessage":"b.sol:1:15: Warning: Function state mutability can be restricted to \"pure\". contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } ^------------------------------------------^ -","message":"Function state mutability can be restricted to pure","severity":"warning","sourceLocation":{"end":58,"file":"b.sol","start":14},"type":"Warning"}],"sources":{"a.sol":{"id":0},"b.sol":{"id":1}}} +","message":"Function state mutability can be restricted to \"pure\".","severity":"warning","sourceLocation":{"end":58,"file":"b.sol","start":14},"type":"Warning"}],"sources":{"a.sol":{"id":0},"b.sol":{"id":1}}} diff --git a/test/cmdlineTests/output_selection_single_B1/output.json b/test/cmdlineTests/output_selection_single_B1/output.json index 3768cbf16..d031319b2 100644 --- a/test/cmdlineTests/output_selection_single_B1/output.json +++ b/test/cmdlineTests/output_selection_single_B1/output.json @@ -1,7 +1,7 @@ {"contracts":{"b.sol":{"B2":{"evm":{"bytecode":{"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","formattedMessage":"b.sol:1:1: Warning: Source file does not specify required compiler version! contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } ^----------------------------------------------------------------------------------------------------------------------------^ -","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":126,"file":"b.sol","start":0},"type":"Warning"},{"component":"general","formattedMessage":"b.sol:1:15: Warning: Function state mutability can be restricted to pure +","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":126,"file":"b.sol","start":0},"type":"Warning"},{"component":"general","formattedMessage":"b.sol:1:15: Warning: Function state mutability can be restricted to \"pure\". contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } ^------------------------------------------^ -","message":"Function state mutability can be restricted to pure","severity":"warning","sourceLocation":{"end":58,"file":"b.sol","start":14},"type":"Warning"}],"sources":{"a.sol":{"id":0},"b.sol":{"id":1}}} +","message":"Function state mutability can be restricted to \"pure\".","severity":"warning","sourceLocation":{"end":58,"file":"b.sol","start":14},"type":"Warning"}],"sources":{"a.sol":{"id":0},"b.sol":{"id":1}}} diff --git a/test/cmdlineTests/recovery_ast_constructor/err b/test/cmdlineTests/recovery_ast_constructor/err index 81c911386..a99395298 100644 --- a/test/cmdlineTests/recovery_ast_constructor/err +++ b/test/cmdlineTests/recovery_ast_constructor/err @@ -4,7 +4,7 @@ Error: Expected primary expression. 5 | balances[tx.origin] = ; // missing RHS. | ^ -Warning: Recovered in Statement at ';'. +Warning: Recovered in Statement at ";". --> recovery_ast_constructor/input.sol:5:27: | 5 | balances[tx.origin] = ; // missing RHS. diff --git a/test/cmdlineTests/recovery_standard_json/output.json b/test/cmdlineTests/recovery_standard_json/output.json index 1f2ab6eb6..e350d0624 100644 --- a/test/cmdlineTests/recovery_standard_json/output.json +++ b/test/cmdlineTests/recovery_standard_json/output.json @@ -1,7 +1,7 @@ {"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}}} +","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}}} diff --git a/test/cmdlineTests/standard_optimizer_yulDetails_without_yul/output.json b/test/cmdlineTests/standard_optimizer_yulDetails_without_yul/output.json index c44794cc1..8b8ac6f26 100644 --- a/test/cmdlineTests/standard_optimizer_yulDetails_without_yul/output.json +++ b/test/cmdlineTests/standard_optimizer_yulDetails_without_yul/output.json @@ -1 +1 @@ -{"errors":[{"component":"general","formattedMessage":"\"Providing yulDetails requires Yul optimizer to be enabled.","message":"\"Providing yulDetails requires Yul optimizer to be enabled.","severity":"error","type":"JSONError"}]} +{"errors":[{"component":"general","formattedMessage":"Providing \"yulDetails\" requires Yul optimizer to be enabled.","message":"Providing \"yulDetails\" requires Yul optimizer to be enabled.","severity":"error","type":"JSONError"}]} diff --git a/test/libsolidity/InlineAssembly.cpp b/test/libsolidity/InlineAssembly.cpp index c4fa1ab8c..1ba661333 100644 --- a/test/libsolidity/InlineAssembly.cpp +++ b/test/libsolidity/InlineAssembly.cpp @@ -179,7 +179,7 @@ BOOST_AUTO_TEST_CASE(smoke_test) BOOST_AUTO_TEST_CASE(surplus_input) { - CHECK_PARSE_ERROR("{ } { }", ParserError, "Expected end of source but got '{'"); + CHECK_PARSE_ERROR("{ } { }", ParserError, "Expected end of source but got " + quote("{")); } BOOST_AUTO_TEST_CASE(simple_instructions) @@ -209,7 +209,7 @@ BOOST_AUTO_TEST_CASE(vardecl) BOOST_AUTO_TEST_CASE(vardecl_name_clashes) { - CHECK_PARSE_ERROR("{ let x := 1 let x := 2 }", DeclarationError, "Variable name x already taken in this scope."); + CHECK_PARSE_ERROR("{ let x := 1 let x := 2 }", DeclarationError, "Variable name" + quoteSpace("x") + "already taken in this scope."); } BOOST_AUTO_TEST_CASE(vardecl_multi) @@ -219,7 +219,7 @@ BOOST_AUTO_TEST_CASE(vardecl_multi) BOOST_AUTO_TEST_CASE(vardecl_multi_conflict) { - CHECK_PARSE_ERROR("{ function f() -> x, y {} let x, x := f() }", DeclarationError, "Variable name x already taken in this scope."); + CHECK_PARSE_ERROR("{ function f() -> x, y {} let x, x := f() }", DeclarationError, "Variable name" + quoteSpace("x") + "already taken in this scope."); } BOOST_AUTO_TEST_CASE(vardecl_bool) @@ -240,7 +240,7 @@ BOOST_AUTO_TEST_CASE(functional) BOOST_AUTO_TEST_CASE(functional_partial) { - CHECK_PARSE_ERROR("{ let x := byte }", ParserError, "Expected '(' but got '}'"); + CHECK_PARSE_ERROR("{ let x := byte }", ParserError, "Expected" + quoteSpace("(") + "but got " + quote("}")); } BOOST_AUTO_TEST_CASE(functional_partial_success) @@ -265,8 +265,8 @@ BOOST_AUTO_TEST_CASE(vardecl_complex) BOOST_AUTO_TEST_CASE(variable_use_before_decl) { - CHECK_PARSE_ERROR("{ x := 2 let x := 3 }", DeclarationError, "Variable x used before it was declared."); - CHECK_PARSE_ERROR("{ let x := mul(2, x) }", DeclarationError, "Variable x used before it was declared."); + CHECK_PARSE_ERROR("{ x := 2 let x := 3 }", DeclarationError, "Variable" + quoteSpace("x") + "used before it was declared."); + CHECK_PARSE_ERROR("{ let x := mul(2, x) }", DeclarationError, "Variable" + quoteSpace("x") + "used before it was declared."); } BOOST_AUTO_TEST_CASE(if_statement) @@ -284,10 +284,10 @@ BOOST_AUTO_TEST_CASE(if_statement_scope) BOOST_AUTO_TEST_CASE(if_statement_invalid) { - CHECK_PARSE_ERROR("{ if mload {} }", ParserError, "Expected '(' but got '{'"); + 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 did return 0 items"); - CHECK_PARSE_ERROR("{ if 32 let x := 3 }", ParserError, "Expected '{' but got reserved keyword 'let'"); + 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")); } BOOST_AUTO_TEST_CASE(switch_statement) @@ -314,8 +314,8 @@ 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 '(' but got reserved keyword 'default'"); - CHECK_PARSE_ERROR("{ switch mstore(1, 1) default {} }", TypeError, "Expected expression to return one item to the stack, but did return 0 items"); + 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."); } BOOST_AUTO_TEST_CASE(switch_default_before_case) @@ -335,7 +335,7 @@ BOOST_AUTO_TEST_CASE(switch_invalid_case) BOOST_AUTO_TEST_CASE(switch_invalid_body) { - CHECK_PARSE_ERROR("{ switch 42 case 1 mul case 2 {} default {} }", ParserError, "Expected '{' but got identifier"); + CHECK_PARSE_ERROR("{ switch 42 case 1 mul case 2 {} default {} }", ParserError, "Expected" + quoteSpace("{") + "but got identifier"); } BOOST_AUTO_TEST_CASE(for_statement) @@ -347,11 +347,11 @@ 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 '{' but got 'Number'"); - CHECK_PARSE_ERROR("{ for {} 1 1 {} }", ParserError, "Expected '{' but got 'Number'"); - CHECK_PARSE_ERROR("{ for {} 1 {} 1 }", ParserError, "Expected '{' but got 'Number'"); - CHECK_PARSE_ERROR("{ for {} mload {} {} }", ParserError, "Expected '(' but got '{'"); - CHECK_PARSE_ERROR("{ for {} mstore(1, 1) {} {} }", TypeError, "Expected expression to return one item to the stack, but did return 0 items"); + 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."); } BOOST_AUTO_TEST_CASE(for_visibility) @@ -364,11 +364,11 @@ BOOST_AUTO_TEST_CASE(for_visibility) 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 x already taken in this scope"); - CHECK_PARSE_ERROR("{ for { let x := 1 } 1 {} { let x := 1 } }", DeclarationError, "Variable name x already taken in this scope"); - CHECK_PARSE_ERROR("{ let x := 1 for { let x := 1 } 1 {} {} }", DeclarationError, "Variable name x already taken in this scope"); - CHECK_PARSE_ERROR("{ let x := 1 for {} 1 { let x := 1 } {} }", DeclarationError, "Variable name x already taken in this scope"); - CHECK_PARSE_ERROR("{ let x := 1 for {} 1 {} { let x := 1 } }", DeclarationError, "Variable name 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("{ 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 } }")); } @@ -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 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 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 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 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 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) { @@ -477,8 +477,8 @@ BOOST_AUTO_TEST_CASE(recursion_depth) BOOST_AUTO_TEST_CASE(multiple_assignment) { - CHECK_PARSE_ERROR("{ let x function f() -> a, b {} 123, x := f() }", ParserError, "Variable name must precede \",\" in multiple assignment."); - CHECK_PARSE_ERROR("{ let x function f() -> a, b {} x, 123 := f() }", ParserError, "Variable name must precede \":=\" in assignment."); + CHECK_PARSE_ERROR("{ let x function f() -> a, b {} 123, x := f() }", ParserError, "Variable name must precede" + quoteSpace(",") + "in multiple assignment."); + CHECK_PARSE_ERROR("{ let x function f() -> a, b {} x, 123 := f() }", ParserError, "Variable name must precede" + quoteSpace(":=") + "in assignment."); /// NOTE: Travis hiccups if not having a variable char const* text = R"( @@ -731,9 +731,9 @@ BOOST_AUTO_TEST_CASE(shift_constantinople_warning) { if (solidity::test::Options::get().evmVersion().hasBitwiseShifting()) return; - CHECK_PARSE_WARNING("{ pop(shl(10, 32)) }", TypeError, "The \"shl\" instruction is only available for Constantinople-compatible VMs"); - CHECK_PARSE_WARNING("{ pop(shr(10, 32)) }", TypeError, "The \"shr\" instruction is only available for Constantinople-compatible VMs"); - CHECK_PARSE_WARNING("{ pop(sar(10, 32)) }", TypeError, "The \"sar\" instruction is only available for Constantinople-compatible VMs"); + CHECK_PARSE_WARNING("{ pop(shl(10, 32)) }", TypeError, "The" + quoteSpace("shl") + "instruction is only available for Constantinople-compatible VMs"); + CHECK_PARSE_WARNING("{ pop(shr(10, 32)) }", TypeError, "The" + quoteSpace("shr") + "instruction is only available for Constantinople-compatible VMs"); + CHECK_PARSE_WARNING("{ pop(sar(10, 32)) }", TypeError, "The" + quoteSpace("sar") + "instruction is only available for Constantinople-compatible VMs"); } BOOST_AUTO_TEST_CASE(jump_error) diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index e5e82d392..182120b05 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -362,7 +362,7 @@ BOOST_AUTO_TEST_CASE(dynamic_return_types_not_possible) } )"; if (solidity::test::Options::get().evmVersion() == EVMVersion::homestead()) - CHECK_ERROR(sourceCode, TypeError, "Type inaccessible dynamic type is not implicitly convertible to expected type string memory."); + CHECK_ERROR(sourceCode, TypeError, "Type" + quoteSpace("inaccessible dynamic type") + "is not implicitly convertible to expected type " + quote("string memory") + "."); else CHECK_SUCCESS_NO_WARNINGS(sourceCode); } @@ -387,7 +387,7 @@ BOOST_AUTO_TEST_CASE(returndatasize_as_variable) {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, std::string("\"returndatasize\" instruction is only available for Byzantium-compatible VMs"))); + expectations.emplace_back(make_pair(Error::Type::TypeError, quote("returndatasize") + " instruction is only available for Byzantium-compatible VMs")); CHECK_ALLOW_MULTI(text, expectations); } @@ -402,7 +402,7 @@ BOOST_AUTO_TEST_CASE(create2_as_variable) {Error::Type::Warning, "Variable is shadowed in inline assembly by an instruction of the same name"} }); if (!solidity::test::Options::get().evmVersion().hasCreate2()) - expectations.emplace_back(make_pair(Error::Type::TypeError, std::string("\"create2\" instruction is only available for Constantinople-compatible VMs"))); + expectations.emplace_back(make_pair(Error::Type::TypeError, quote("create2") + " instruction is only available for Constantinople-compatible VMs")); CHECK_ALLOW_MULTI(text, expectations); } @@ -417,7 +417,7 @@ BOOST_AUTO_TEST_CASE(extcodehash_as_variable) {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, std::string("\"extcodehash\" instruction is only available for Constantinople-compatible VMs"))); + expectations.emplace_back(make_pair(Error::Type::TypeError, quote("extcodehash") + " instruction is only available for Constantinople-compatible VMs")); CHECK_ALLOW_MULTI(text, expectations); } @@ -455,7 +455,7 @@ BOOST_AUTO_TEST_CASE(address_staticcall) if (solidity::test::Options::get().evmVersion().hasStaticCall()) CHECK_SUCCESS_NO_WARNINGS(sourceCode); else - CHECK_ERROR(sourceCode, TypeError, "\"staticcall\" is not supported by the VM version."); + CHECK_ERROR(sourceCode, TypeError, quote("staticcall") + " is not supported by the VM version."); } BOOST_AUTO_TEST_CASE(address_staticcall_value) @@ -469,7 +469,7 @@ BOOST_AUTO_TEST_CASE(address_staticcall_value) } } )"; - CHECK_ERROR(sourceCode, TypeError, "Member \"value\" is only available for payable functions."); + CHECK_ERROR(sourceCode, TypeError, "Member" + quoteSpace("value") + "is only available for payable functions."); } } @@ -487,7 +487,7 @@ BOOST_AUTO_TEST_CASE(address_call_full_return_type) if (solidity::test::Options::get().evmVersion().supportsReturndata()) CHECK_SUCCESS_NO_WARNINGS(sourceCode); else - CHECK_ERROR(sourceCode, TypeError, "Type inaccessible dynamic type is not implicitly convertible to expected type bytes memory."); + CHECK_ERROR(sourceCode, TypeError, "Type" + quoteSpace("inaccessible dynamic type") + "is not implicitly convertible to expected type " + quote("bytes memory") + "."); } BOOST_AUTO_TEST_CASE(address_delegatecall_full_return_type) @@ -504,7 +504,7 @@ BOOST_AUTO_TEST_CASE(address_delegatecall_full_return_type) if (solidity::test::Options::get().evmVersion().supportsReturndata()) CHECK_SUCCESS_NO_WARNINGS(sourceCode); else - CHECK_ERROR(sourceCode, TypeError, "Type inaccessible dynamic type is not implicitly convertible to expected type bytes memory."); + CHECK_ERROR(sourceCode, TypeError, "Type" + quoteSpace("inaccessible dynamic type") + "is not implicitly convertible to expected type " + quote("bytes memory") + "."); } diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index 6a0c9efbd..082167c6e 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -148,7 +148,7 @@ BOOST_AUTO_TEST_CASE(unsatisfied_version_with_recovery) } )"; Error err = getError(text, true); - BOOST_CHECK(searchErrorMessage(err, "Expected identifier but got ';'")); + BOOST_CHECK(searchErrorMessage(err, "Expected identifier but got " + quote(";"))); } BOOST_AUTO_TEST_CASE(function_natspec_documentation) @@ -516,13 +516,13 @@ BOOST_AUTO_TEST_CASE(multiple_visibility_specifiers) uint private internal a; } )"; - CHECK_PARSE_ERROR(text, "Visibility already specified as \"private\"."); + CHECK_PARSE_ERROR(text, "Visibility already specified as " + quote("private")); text = R"( contract c { function f() private external {} } )"; - CHECK_PARSE_ERROR(text, "Visibility already specified as \"private\"."); + CHECK_PARSE_ERROR(text, "Visibility already specified as " + quote("private")); } BOOST_AUTO_TEST_CASE(keyword_is_reserved) @@ -568,7 +568,7 @@ BOOST_AUTO_TEST_CASE(keyword_is_reserved) for (auto const& keyword: keywords) { auto text = std::string("contract ") + keyword + " {}"; - CHECK_PARSE_ERROR(text.c_str(), string("Expected identifier but got reserved keyword '") + keyword + "'"); + CHECK_PARSE_ERROR(text.c_str(), string("Expected identifier but got reserved keyword ") + quote(keyword)); } } diff --git a/test/libsolidity/StandardCompiler.cpp b/test/libsolidity/StandardCompiler.cpp index 31c37060a..7c4874332 100644 --- a/test/libsolidity/StandardCompiler.cpp +++ b/test/libsolidity/StandardCompiler.cpp @@ -24,10 +24,12 @@ #include #include #include +#include #include using namespace std; using namespace solidity::evmasm; +using namespace solidity::langutil; namespace solidity::frontend::test { @@ -126,7 +128,7 @@ BOOST_AUTO_TEST_CASE(invalid_language) } )"; Json::Value result = compile(input); - BOOST_CHECK(containsError(result, "JSONError", "Only \"Solidity\" or \"Yul\" is supported as a language.")); + BOOST_CHECK(containsError(result, "JSONError", "Only" + quoteSpace("Solidity") + "or" + quoteSpace("Yul") + "is supported as a language.")); } BOOST_AUTO_TEST_CASE(valid_language) @@ -137,7 +139,7 @@ BOOST_AUTO_TEST_CASE(valid_language) } )"; Json::Value result = compile(input); - BOOST_CHECK(!containsError(result, "JSONError", "Only \"Solidity\" or \"Yul\" is supported as a language.")); + BOOST_CHECK(!containsError(result, "JSONError", "Only" + quoteSpace("Solidity") + "or" + quoteSpace("Yul") + "is supported as a language.")); } BOOST_AUTO_TEST_CASE(no_sources) @@ -172,7 +174,7 @@ BOOST_AUTO_TEST_CASE(no_sources_empty_array) } )"; Json::Value result = compile(input); - BOOST_CHECK(containsError(result, "JSONError", "\"sources\" is not a JSON object.")); + BOOST_CHECK(containsError(result, "JSONError", quote("sources") + " is not a JSON object.")); } BOOST_AUTO_TEST_CASE(sources_is_array) @@ -184,7 +186,7 @@ BOOST_AUTO_TEST_CASE(sources_is_array) } )"; Json::Value result = compile(input); - BOOST_CHECK(containsError(result, "JSONError", "\"sources\" is not a JSON object.")); + BOOST_CHECK(containsError(result, "JSONError", quote("sources") + " is not a JSON object.")); } BOOST_AUTO_TEST_CASE(unexpected_trailing_test) @@ -238,7 +240,7 @@ BOOST_AUTO_TEST_CASE(error_recovery_field) )"; Json::Value result = compile(input); - BOOST_CHECK(containsError(result, "JSONError", "\"settings.parserErrorRecovery\" must be a Boolean.")); + BOOST_CHECK(containsError(result, "JSONError", quote("settings.parserErrorRecovery") + " must be a Boolean.")); input = R"( { @@ -276,7 +278,7 @@ BOOST_AUTO_TEST_CASE(optimizer_enabled_not_boolean) } )"; Json::Value result = compile(input); - BOOST_CHECK(containsError(result, "JSONError", "The \"enabled\" setting must be a Boolean.")); + BOOST_CHECK(containsError(result, "JSONError", "The" + quoteSpace("enabled") + "setting must be a Boolean.")); } BOOST_AUTO_TEST_CASE(optimizer_runs_not_a_number) @@ -298,7 +300,7 @@ BOOST_AUTO_TEST_CASE(optimizer_runs_not_a_number) } )"; Json::Value result = compile(input); - BOOST_CHECK(containsError(result, "JSONError", "The \"runs\" setting must be an unsigned number.")); + BOOST_CHECK(containsError(result, "JSONError", "The" + quoteSpace("runs") + "setting must be an unsigned number.")); } BOOST_AUTO_TEST_CASE(optimizer_runs_not_an_unsigned_number) @@ -320,7 +322,7 @@ BOOST_AUTO_TEST_CASE(optimizer_runs_not_an_unsigned_number) } )"; Json::Value result = compile(input); - BOOST_CHECK(containsError(result, "JSONError", "The \"runs\" setting must be an unsigned number.")); + BOOST_CHECK(containsError(result, "JSONError", "The" + quoteSpace("runs") + "setting must be an unsigned number.")); } BOOST_AUTO_TEST_CASE(basic_compilation) @@ -461,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\"}" ); } @@ -726,7 +728,7 @@ BOOST_AUTO_TEST_CASE(libraries_invalid_top_level) } )"; Json::Value result = compile(input); - BOOST_CHECK(containsError(result, "JSONError", "\"libraries\" is not a JSON object.")); + BOOST_CHECK(containsError(result, "JSONError", quote("libraries") + " is not a JSON object.")); } BOOST_AUTO_TEST_CASE(libraries_invalid_entry) @@ -770,7 +772,7 @@ BOOST_AUTO_TEST_CASE(libraries_invalid_hex) } )"; Json::Value result = compile(input); - BOOST_CHECK(containsError(result, "JSONError", "Invalid library address (\"0x4200000000000000000000000000000000000xx1\") supplied.")); + BOOST_CHECK(containsError(result, "JSONError", "Invalid library address (" + quote("0x4200000000000000000000000000000000000xx1") + ") supplied.")); } BOOST_AUTO_TEST_CASE(libraries_invalid_length) @@ -817,7 +819,7 @@ BOOST_AUTO_TEST_CASE(libraries_missing_hex_prefix) } )"; Json::Value result = compile(input); - BOOST_CHECK(containsError(result, "JSONError", "Library address is not prefixed with \"0x\".")); + BOOST_CHECK(containsError(result, "JSONError", "Library address is not prefixed with " + quote("0x") + ".")); } BOOST_AUTO_TEST_CASE(library_linking) diff --git a/test/libsolidity/ViewPureChecker.cpp b/test/libsolidity/ViewPureChecker.cpp index a29d13525..fc14f20c6 100644 --- a/test/libsolidity/ViewPureChecker.cpp +++ b/test/libsolidity/ViewPureChecker.cpp @@ -70,28 +70,28 @@ BOOST_AUTO_TEST_CASE(environment_access) CHECK_ERROR( "contract C { function f() pure public { " + x + "; } }", TypeError, - "Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires \"view\"" + "Function declared as " + quote("pure") + ", but this expression (potentially) reads from the environment or state and thus requires " + quote("view") + "." ); } for (string const& x: pure) { CHECK_WARNING( "contract C { function f() view public { " + x + "; } }", - "Function state mutability can be restricted to pure" + "Function state mutability can be restricted to " + quote("pure") + "." ); } CHECK_WARNING_ALLOW_MULTI( "contract C { function f() view public { blockhash; } }", (std::vector{ - "Function state mutability can be restricted to pure", + "Function state mutability can be restricted to " + quote("pure") + ".", "Statement has no effect." })); CHECK_ERROR( "contract C { function f() view public { block.blockhash; } }", TypeError, - "\"block.blockhash()\" has been deprecated in favor of \"blockhash()\"" + quote("block.blockhash()") + " has been deprecated in favor of " + quote("blockhash()") + "." ); } @@ -106,7 +106,7 @@ BOOST_AUTO_TEST_CASE(address_staticcall) } )"; if (!solidity::test::Options::get().evmVersion().hasStaticCall()) - CHECK_ERROR(text, TypeError, "\"staticcall\" is not supported by the VM version."); + CHECK_ERROR(text, TypeError, quote("staticcall") + " is not supported by the VM version."); else CHECK_SUCCESS_NO_WARNINGS(text); } @@ -122,7 +122,7 @@ BOOST_AUTO_TEST_CASE(assembly_staticcall) } )"; if (!solidity::test::Options::get().evmVersion().hasStaticCall()) - CHECK_ERROR(text, TypeError, "\"staticcall\" instruction is only available for Byzantium-compatible"); + CHECK_ERROR(text, TypeError, quote("staticcall") + " instruction is only available for Byzantium-compatible"); else CHECK_SUCCESS_NO_WARNINGS(text); } diff --git a/test/libsolidity/errorRecoveryTests/constructor_recovers.sol b/test/libsolidity/errorRecoveryTests/constructor_recovers.sol index 804bb7283..ddb929935 100644 --- a/test/libsolidity/errorRecoveryTests/constructor_recovers.sol +++ b/test/libsolidity/errorRecoveryTests/constructor_recovers.sol @@ -17,4 +17,4 @@ contract Error1 { } // ---- // ParserError: (95-96): Expected primary expression. -// Warning: (95-96): Recovered in Statement at ';'. +// Warning: (95-96): Recovered in Statement at ";". diff --git a/test/libsolidity/errorRecoveryTests/contract_recovery.sol b/test/libsolidity/errorRecoveryTests/contract_recovery.sol index 4047adb31..59c10ec6a 100644 --- a/test/libsolidity/errorRecoveryTests/contract_recovery.sol +++ b/test/libsolidity/errorRecoveryTests/contract_recovery.sol @@ -4,4 +4,4 @@ contract Errort6 { // ---- // ParserError: (36-37): Expected type name -// Warning: (59-60): Recovered in ContractDefinition at '}'. +// Warning: (59-60): Recovered in ContractDefinition at "}". diff --git a/test/libsolidity/errorRecoveryTests/do_not_delete_at_error.sol b/test/libsolidity/errorRecoveryTests/do_not_delete_at_error.sol index a7e4254b0..26d097013 100644 --- a/test/libsolidity/errorRecoveryTests/do_not_delete_at_error.sol +++ b/test/libsolidity/errorRecoveryTests/do_not_delete_at_error.sol @@ -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 diff --git a/test/libsolidity/errorRecoveryTests/error_to_eos.sol b/test/libsolidity/errorRecoveryTests/error_to_eos.sol index d396207b0..be91dd5e3 100644 --- a/test/libsolidity/errorRecoveryTests/error_to_eos.sol +++ b/test/libsolidity/errorRecoveryTests/error_to_eos.sol @@ -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 '}'. +// Warning: (235-236): Recovered in ContractDefinition at "}". diff --git a/test/libsolidity/errorRecoveryTests/missing_rhs.sol b/test/libsolidity/errorRecoveryTests/missing_rhs.sol index 991525b46..f9e89505c 100644 --- a/test/libsolidity/errorRecoveryTests/missing_rhs.sol +++ b/test/libsolidity/errorRecoveryTests/missing_rhs.sol @@ -8,4 +8,4 @@ contract Error3 { } // ---- // ParserError: (95-96): Expected primary expression. -// Warning: (95-96): Recovered in Statement at ';'. +// Warning: (95-96): Recovered in Statement at ";". diff --git a/test/libsolidity/errorRecoveryTests/multiple_errors.sol b/test/libsolidity/errorRecoveryTests/multiple_errors.sol index 9127ef387..a7a1873b9 100644 --- a/test/libsolidity/errorRecoveryTests/multiple_errors.sol +++ b/test/libsolidity/errorRecoveryTests/multiple_errors.sol @@ -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 ';'. +// Warning: (588-589): Recovered in Statement at ";". diff --git a/test/libsolidity/smtCheckerTests/complex/MerkleProof.sol b/test/libsolidity/smtCheckerTests/complex/MerkleProof.sol index 955d5fd1e..fdbd9616b 100644 --- a/test/libsolidity/smtCheckerTests/complex/MerkleProof.sol +++ b/test/libsolidity/smtCheckerTests/complex/MerkleProof.sol @@ -35,8 +35,8 @@ library MerkleProof { // ---- // Warning: (755-767): Assertion checker does not yet support this expression. -// Warning: (988-991): Assertion checker does not yet implement type abi +// Warning: (988-991): Assertion checker does not yet implement type "abi". // Warning: (988-1032): Assertion checker does not yet implement this type of function call. -// Warning: (1175-1178): Assertion checker does not yet implement type abi +// Warning: (1175-1178): Assertion checker does not yet implement type "abi". // Warning: (1175-1219): Assertion checker does not yet implement this type of function call. // Warning: (755-767): Assertion checker does not yet support this expression. diff --git a/test/libsolidity/smtCheckerTests/complex/slither/const_state_variables.sol b/test/libsolidity/smtCheckerTests/complex/slither/const_state_variables.sol index a37a7e64e..0fc50faa7 100644 --- a/test/libsolidity/smtCheckerTests/complex/slither/const_state_variables.sol +++ b/test/libsolidity/smtCheckerTests/complex/slither/const_state_variables.sol @@ -52,6 +52,6 @@ contract MyConc{ } // ---- // Warning: (773-792): This declaration shadows an existing declaration. -// Warning: (1009-1086): Function state mutability can be restricted to view +// Warning: (1009-1086): Function state mutability can be restricted to "view". // Warning: (985-1002): Underflow (resulting value less than 0) happens here. // Warning: (985-1002): Overflow (resulting value larger than 2**256 - 1) happens here. diff --git a/test/libsolidity/smtCheckerTests/complex/slither/data_dependency.sol b/test/libsolidity/smtCheckerTests/complex/slither/data_dependency.sol index 29f15c689..32064512d 100644 --- a/test/libsolidity/smtCheckerTests/complex/slither/data_dependency.sol +++ b/test/libsolidity/smtCheckerTests/complex/slither/data_dependency.sol @@ -117,23 +117,23 @@ contract PropagateThroughReturnValue { } } // ---- -// Warning: (1886-1954): Function state mutability can be restricted to view +// Warning: (1886-1954): Function state mutability can be restricted to "view". // Warning: (318-332): Assertion checker does not yet support the type of this variable. // Warning: (338-347): Assertion checker does not yet support the type of this variable. // Warning: (353-378): Assertion checker does not yet support the type of this variable. // Warning: (384-409): Assertion checker does not yet support the type of this variable. // Warning: (464-479): Assertion checker does not yet support this expression. -// Warning: (464-475): Assertion checker does not yet implement type struct Reference.St storage ref +// Warning: (464-475): Assertion checker does not yet implement type "struct Reference.St storage ref". // Warning: (464-494): Assertion checker does not yet implement such assignments. // Warning: (539-554): Assertion checker does not yet support this expression. -// Warning: (539-550): Assertion checker does not yet implement type struct Reference.St storage ref +// Warning: (539-550): Assertion checker does not yet implement type "struct Reference.St storage ref". // Warning: (557-567): Assertion checker does not yet support this expression. -// Warning: (557-563): Assertion checker does not yet implement type struct Reference.St storage ref +// Warning: (557-563): Assertion checker does not yet implement type "struct Reference.St storage ref". // Warning: (539-567): Assertion checker does not yet implement such assignments. // Warning: (629-643): Assertion checker does not yet support the type of this variable. -// Warning: (646-668): Assertion checker does not yet implement type struct Reference.St storage ref -// Warning: (706-728): Assertion checker does not yet implement type struct Reference.St storage ref -// Warning: (700-728): Assertion checker does not yet implement type struct Reference.St storage pointer +// Warning: (646-668): Assertion checker does not yet implement type "struct Reference.St storage ref". +// Warning: (706-728): Assertion checker does not yet implement type "struct Reference.St storage ref". +// Warning: (700-728): Assertion checker does not yet implement type "struct Reference.St storage pointer". // Warning: (748-755): Assertion checker does not yet support this expression. -// Warning: (748-751): Assertion checker does not yet implement type struct Reference.St storage pointer +// Warning: (748-751): Assertion checker does not yet implement type "struct Reference.St storage pointer". // Warning: (748-770): Assertion checker does not yet implement such assignments. diff --git a/test/libsolidity/smtCheckerTests/complex/slither/external_function.sol b/test/libsolidity/smtCheckerTests/complex/slither/external_function.sol index 43bd10cf7..a39754da1 100644 --- a/test/libsolidity/smtCheckerTests/complex/slither/external_function.sol +++ b/test/libsolidity/smtCheckerTests/complex/slither/external_function.sol @@ -77,13 +77,13 @@ contract InternalCall { // Warning: (117-126): Unused local variable. // Warning: (260-269): Unused local variable. // Warning: (667-676): Unused local variable. -// Warning: (75-137): Function state mutability can be restricted to pure -// Warning: (218-280): Function state mutability can be restricted to pure -// Warning: (470-539): Function state mutability can be restricted to pure -// Warning: (1144-1206): Function state mutability can be restricted to pure -// Warning: (1212-1274): Function state mutability can be restricted to pure -// Warning: (1280-1342): Function state mutability can be restricted to pure -// Warning: (771-774): Assertion checker does not yet implement type abi +// Warning: (75-137): Function state mutability can be restricted to "pure". +// Warning: (218-280): Function state mutability can be restricted to "pure". +// Warning: (470-539): Function state mutability can be restricted to "pure". +// Warning: (1144-1206): Function state mutability can be restricted to "pure". +// Warning: (1212-1274): Function state mutability can be restricted to "pure". +// Warning: (1280-1342): Function state mutability can be restricted to "pure". +// Warning: (771-774): Assertion checker does not yet implement type "abi". // Warning: (782-813): Type conversion is not yet fully supported and might yield false positives. // Warning: (771-814): Assertion checker does not yet implement this type of function call. // Warning: (1403-1408): Assertion checker does not yet implement this type of function call. diff --git a/test/libsolidity/smtCheckerTests/complex/warn_on_struct.sol b/test/libsolidity/smtCheckerTests/complex/warn_on_struct.sol index 33cf71e81..ca09fff93 100644 --- a/test/libsolidity/smtCheckerTests/complex/warn_on_struct.sol +++ b/test/libsolidity/smtCheckerTests/complex/warn_on_struct.sol @@ -9,6 +9,6 @@ contract C { // ---- // Warning: (133-143): Unused local variable. // Warning: (133-143): Assertion checker does not yet support the type of this variable. -// Warning: (146-147): Assertion checker does not yet implement type type(struct C.A storage pointer) -// Warning: (146-163): Assertion checker does not yet implement type struct C.A memory +// Warning: (146-147): Assertion checker does not yet implement type "type(struct C.A storage pointer)". +// Warning: (146-163): Assertion checker does not yet implement type "struct C.A memory". // Warning: (146-163): Assertion checker does not yet implement this expression. diff --git a/test/libsolidity/smtCheckerTests/functions/abi_encode_functions.sol b/test/libsolidity/smtCheckerTests/functions/abi_encode_functions.sol index fc34426fc..873349bad 100644 --- a/test/libsolidity/smtCheckerTests/functions/abi_encode_functions.sol +++ b/test/libsolidity/smtCheckerTests/functions/abi_encode_functions.sol @@ -5,7 +5,7 @@ contract C { } } // ---- -// Warning: (162-165): Assertion checker does not yet implement type abi +// Warning: (162-165): Assertion checker does not yet implement type "abi". // Warning: (162-176): Assertion checker does not yet implement this type of function call. -// Warning: (178-181): Assertion checker does not yet implement type abi +// Warning: (178-181): Assertion checker does not yet implement type "abi". // Warning: (178-203): Assertion checker does not yet implement this type of function call. diff --git a/test/libsolidity/smtCheckerTests/functions/functions_library_1.sol b/test/libsolidity/smtCheckerTests/functions/functions_library_1.sol index 85387017b..48f312d8f 100644 --- a/test/libsolidity/smtCheckerTests/functions/functions_library_1.sol +++ b/test/libsolidity/smtCheckerTests/functions/functions_library_1.sol @@ -17,4 +17,4 @@ contract C } } // ---- -// Warning: (228-229): Assertion checker does not yet implement type type(library L) +// Warning: (228-229): Assertion checker does not yet implement type "type(library L)". diff --git a/test/libsolidity/smtCheckerTests/functions/functions_library_1_fail.sol b/test/libsolidity/smtCheckerTests/functions/functions_library_1_fail.sol index 5eda70213..763713637 100644 --- a/test/libsolidity/smtCheckerTests/functions/functions_library_1_fail.sol +++ b/test/libsolidity/smtCheckerTests/functions/functions_library_1_fail.sol @@ -17,5 +17,5 @@ contract C } } // ---- -// Warning: (228-229): Assertion checker does not yet implement type type(library L) +// Warning: (228-229): Assertion checker does not yet implement type "type(library L)". // Warning: (245-261): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/operators/delete_struct.sol b/test/libsolidity/smtCheckerTests/operators/delete_struct.sol index 57a10c1eb..f5c048fc7 100644 --- a/test/libsolidity/smtCheckerTests/operators/delete_struct.sol +++ b/test/libsolidity/smtCheckerTests/operators/delete_struct.sol @@ -17,14 +17,14 @@ contract C } } // ---- -// Warning: (73-192): Function state mutability can be restricted to pure +// Warning: (73-192): Function state mutability can be restricted to "pure". // Warning: (103-113): Assertion checker does not yet support the type of this variable. // Warning: (117-120): Assertion checker does not yet support this expression. -// Warning: (117-118): Assertion checker does not yet implement type struct C.S memory +// Warning: (117-118): Assertion checker does not yet implement type "struct C.S memory". // Warning: (117-124): Assertion checker does not yet implement such assignments. // Warning: (165-168): Assertion checker does not yet support this expression. -// Warning: (165-166): Assertion checker does not yet implement type struct C.S memory +// Warning: (165-166): Assertion checker does not yet implement type "struct C.S memory". // Warning: (158-168): Assertion checker does not yet implement "delete" for this expression. // Warning: (179-182): Assertion checker does not yet support this expression. -// Warning: (179-180): Assertion checker does not yet implement type struct C.S memory +// Warning: (179-180): Assertion checker does not yet implement type "struct C.S memory". // Warning: (172-188): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2.sol b/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2.sol index a38c93e6f..f9b9c8d55 100644 --- a/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2.sol +++ b/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2.sol @@ -9,8 +9,8 @@ contract C { } // ---- // Warning: (151-159): Assertion checker does not yet support the type of this variable. -// Warning: (206-209): Assertion checker does not yet implement type abi -// Warning: (225-226): Assertion checker does not yet implement type type(struct C.S storage pointer) -// Warning: (235-241): Assertion checker does not yet implement type type(uint256[] memory) -// Warning: (235-244): Assertion checker does not yet implement type type(uint256[] memory[2] memory) +// Warning: (206-209): Assertion checker does not yet implement type "abi". +// Warning: (225-226): Assertion checker does not yet implement type "type(struct C.S storage pointer)". +// Warning: (235-241): Assertion checker does not yet implement type "type(uint256[] memory)". +// Warning: (235-244): Assertion checker does not yet implement type "type(uint256[] memory[2] memory)". // Warning: (206-246): Assertion checker does not yet implement this type of function call. diff --git a/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2_value_types.sol b/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2_value_types.sol index dea9b411f..95e61b699 100644 --- a/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2_value_types.sol +++ b/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2_value_types.sol @@ -12,8 +12,8 @@ contract C { // ---- // Warning: (125-132): Unused local variable. // Warning: (183-190): Unused local variable. -// Warning: (136-139): Assertion checker does not yet implement type abi +// Warning: (136-139): Assertion checker does not yet implement type "abi". // Warning: (136-167): Assertion checker does not yet implement this type of function call. -// Warning: (194-197): Assertion checker does not yet implement type abi +// Warning: (194-197): Assertion checker does not yet implement type "abi". // Warning: (194-225): Assertion checker does not yet implement this type of function call. // Warning: (303-319): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/special/abi_decode_simple.sol b/test/libsolidity/smtCheckerTests/special/abi_decode_simple.sol index c06577e0f..15d913362 100644 --- a/test/libsolidity/smtCheckerTests/special/abi_decode_simple.sol +++ b/test/libsolidity/smtCheckerTests/special/abi_decode_simple.sol @@ -14,11 +14,11 @@ contract C { // Warning: (100-104): Unused local variable. // Warning: (161-171): Unused local variable. // Warning: (173-177): Unused local variable. -// Warning: (108-111): Assertion checker does not yet implement type abi -// Warning: (142-143): Assertion checker does not yet implement type type(contract C) +// Warning: (108-111): Assertion checker does not yet implement type "abi". +// Warning: (142-143): Assertion checker does not yet implement type "type(contract C)". // Warning: (108-145): Assertion checker does not yet implement this type of function call. -// Warning: (181-184): Assertion checker does not yet implement type abi -// Warning: (215-216): Assertion checker does not yet implement type type(contract C) +// Warning: (181-184): Assertion checker does not yet implement type "abi". +// Warning: (215-216): Assertion checker does not yet implement type "type(contract C)". // Warning: (181-218): Assertion checker does not yet implement this type of function call. // Warning: (296-312): Assertion violation happens here // Warning: (315-331): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/typecast/enum_from_uint.sol b/test/libsolidity/smtCheckerTests/typecast/enum_from_uint.sol index 33a7d972b..3672376f3 100644 --- a/test/libsolidity/smtCheckerTests/typecast/enum_from_uint.sol +++ b/test/libsolidity/smtCheckerTests/typecast/enum_from_uint.sol @@ -10,6 +10,6 @@ contract C } } // ---- -// Warning: (132-133): Assertion checker does not yet implement type type(enum C.D) +// Warning: (132-133): Assertion checker does not yet implement type "type(enum C.D)". // Warning: (132-136): Type conversion is not yet fully supported and might yield false positives. // Warning: (140-160): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/typecast/function_type_to_function_type_internal.sol b/test/libsolidity/smtCheckerTests/typecast/function_type_to_function_type_internal.sol index 1657a95c6..4b10639a7 100644 --- a/test/libsolidity/smtCheckerTests/typecast/function_type_to_function_type_internal.sol +++ b/test/libsolidity/smtCheckerTests/typecast/function_type_to_function_type_internal.sol @@ -8,6 +8,6 @@ contract C { // ---- // Warning: (146-150): Assertion checker does not yet implement this type of function call. // Warning: (154-158): Assertion checker does not yet implement this type of function call. -// Warning: (170-176): Assertion checker does not yet implement the type function (uint256) returns (uint256) for comparisons +// Warning: (170-176): Assertion checker does not yet implement the type "function (uint256) returns (uint256)" for comparisons. // Warning: (139-159): Assertion violation happens here // Warning: (163-177): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/types/array_branch_1d.sol b/test/libsolidity/smtCheckerTests/types/array_branch_1d.sol index f4b22cf32..d24312e7f 100644 --- a/test/libsolidity/smtCheckerTests/types/array_branch_1d.sol +++ b/test/libsolidity/smtCheckerTests/types/array_branch_1d.sol @@ -10,5 +10,5 @@ contract C } } // ---- -// Warning: (47-148): Function state mutability can be restricted to pure +// Warning: (47-148): Function state mutability can be restricted to "pure". // Warning: (128-144): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/types/array_branches_1d.sol b/test/libsolidity/smtCheckerTests/types/array_branches_1d.sol index a7bc62eb0..fc4c73f1e 100644 --- a/test/libsolidity/smtCheckerTests/types/array_branches_1d.sol +++ b/test/libsolidity/smtCheckerTests/types/array_branches_1d.sol @@ -12,4 +12,4 @@ contract C } } // ---- -// Warning: (47-168): Function state mutability can be restricted to pure +// Warning: (47-168): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/smtCheckerTests/types/array_struct_array_branches_2d.sol b/test/libsolidity/smtCheckerTests/types/array_struct_array_branches_2d.sol index ee92be251..8fbecdaed 100644 --- a/test/libsolidity/smtCheckerTests/types/array_struct_array_branches_2d.sol +++ b/test/libsolidity/smtCheckerTests/types/array_struct_array_branches_2d.sol @@ -15,18 +15,18 @@ contract C } // ---- // Warning: (124-130): Assertion checker does not yet support this expression. -// Warning: (124-128): Assertion checker does not yet implement type struct C.S memory +// Warning: (124-128): Assertion checker does not yet implement type "struct C.S memory". // Warning: (124-133): Assertion checker does not yet implement this expression. // Warning: (124-136): Assertion checker does not yet implement this expression. // Warning: (154-160): Assertion checker does not yet support this expression. -// Warning: (154-158): Assertion checker does not yet implement type struct C.S memory +// Warning: (154-158): Assertion checker does not yet implement type "struct C.S memory". // Warning: (154-163): Assertion checker does not yet implement this expression. // Warning: (154-166): Assertion checker does not yet implement this expression. // Warning: (182-188): Assertion checker does not yet support this expression. -// Warning: (182-186): Assertion checker does not yet implement type struct C.S memory +// Warning: (182-186): Assertion checker does not yet implement type "struct C.S memory". // Warning: (182-191): Assertion checker does not yet implement this expression. // Warning: (182-194): Assertion checker does not yet implement this expression. // Warning: (209-215): Assertion checker does not yet support this expression. -// Warning: (209-213): Assertion checker does not yet implement type struct C.S memory +// Warning: (209-213): Assertion checker does not yet implement type "struct C.S memory". // Warning: (209-218): Assertion checker does not yet implement this expression. // Warning: (202-226): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/types/enum_in_struct.sol b/test/libsolidity/smtCheckerTests/types/enum_in_struct.sol index 47bdd0c66..c5a0789de 100644 --- a/test/libsolidity/smtCheckerTests/types/enum_in_struct.sol +++ b/test/libsolidity/smtCheckerTests/types/enum_in_struct.sol @@ -12,8 +12,8 @@ contract C // ---- // Warning: (109-119): Assertion checker does not yet support the type of this variable. // Warning: (139-142): Assertion checker does not yet support this expression. -// Warning: (139-140): Assertion checker does not yet implement type struct C.S memory +// Warning: (139-140): Assertion checker does not yet implement type "struct C.S memory". // Warning: (139-151): Assertion checker does not yet implement such assignments. // Warning: (162-165): Assertion checker does not yet support this expression. -// Warning: (162-163): Assertion checker does not yet implement type struct C.S memory +// Warning: (162-163): Assertion checker does not yet implement type "struct C.S memory". // Warning: (155-176): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/types/function_type_nested.sol b/test/libsolidity/smtCheckerTests/types/function_type_nested.sol index 5eb637315..cff669e95 100644 --- a/test/libsolidity/smtCheckerTests/types/function_type_nested.sol +++ b/test/libsolidity/smtCheckerTests/types/function_type_nested.sol @@ -14,9 +14,9 @@ contract C { // ---- // Warning: (123-128): Assertion checker does not yet implement this type of function call. // Warning: (152-197): Assertion checker does not yet support the type of this variable. -// Warning: (212-214): Assertion checker does not yet implement type function (function (uint256)) +// Warning: (212-214): Assertion checker does not yet implement type "function (function (uint256))". // Warning: (212-219): Assertion checker does not yet implement this type of function call. // Warning: (255-257): Internal error: Expression undefined for SMT solver. -// Warning: (255-257): Assertion checker does not yet implement type function (function (uint256)) -// Warning: (212-214): Assertion checker does not yet implement type function (function (uint256)) +// Warning: (255-257): Assertion checker does not yet implement type "function (function (uint256))". +// Warning: (212-214): Assertion checker does not yet implement type "function (function (uint256))". // Warning: (212-219): Assertion checker does not yet implement this type of function call. diff --git a/test/libsolidity/smtCheckerTests/types/function_type_nested_return.sol b/test/libsolidity/smtCheckerTests/types/function_type_nested_return.sol index 2e974fef8..79942b3dc 100644 --- a/test/libsolidity/smtCheckerTests/types/function_type_nested_return.sol +++ b/test/libsolidity/smtCheckerTests/types/function_type_nested_return.sol @@ -17,11 +17,11 @@ contract C { // ---- // Warning: (195-200): Assertion checker does not yet implement this type of function call. // Warning: (224-269): Assertion checker does not yet support the type of this variable. -// Warning: (284-286): Assertion checker does not yet implement type function (function (uint256)) +// Warning: (284-286): Assertion checker does not yet implement type "function (function (uint256))". // Warning: (287-288): Assertion checker does not yet support this global variable. // Warning: (284-291): Assertion checker does not yet implement this type of function call. // Warning: (327-329): Internal error: Expression undefined for SMT solver. -// Warning: (327-329): Assertion checker does not yet implement type function (function (uint256)) -// Warning: (284-286): Assertion checker does not yet implement type function (function (uint256)) +// Warning: (327-329): Assertion checker does not yet implement type "function (function (uint256))". +// Warning: (284-286): Assertion checker does not yet implement type "function (function (uint256))". // Warning: (287-288): Assertion checker does not yet support this global variable. // Warning: (284-291): Assertion checker does not yet implement this type of function call. diff --git a/test/libsolidity/smtCheckerTests/types/no_effect_statements.sol b/test/libsolidity/smtCheckerTests/types/no_effect_statements.sol index f4d1299e9..e03087a1e 100644 --- a/test/libsolidity/smtCheckerTests/types/no_effect_statements.sol +++ b/test/libsolidity/smtCheckerTests/types/no_effect_statements.sol @@ -15,10 +15,10 @@ contract test { // Warning: (140-144): Statement has no effect. // Warning: (148-152): Statement has no effect. // Warning: (156-163): Statement has no effect. -// Warning: (125-126): Assertion checker does not yet implement type type(struct test.s storage pointer) -// Warning: (130-131): Assertion checker does not yet implement type type(struct test.s storage pointer) -// Warning: (130-136): Assertion checker does not yet implement type struct test.s memory +// Warning: (125-126): Assertion checker does not yet implement type "type(struct test.s storage pointer)". +// Warning: (130-131): Assertion checker does not yet implement type "type(struct test.s storage pointer)". +// Warning: (130-136): Assertion checker does not yet implement type "struct test.s memory". // Warning: (130-136): Assertion checker does not yet implement this expression. -// Warning: (140-141): Assertion checker does not yet implement type type(struct test.s storage pointer) -// Warning: (140-144): Assertion checker does not yet implement type type(struct test.s memory[7] memory) -// Warning: (156-163): Assertion checker does not yet implement type type(uint256[7] memory) +// Warning: (140-141): Assertion checker does not yet implement type "type(struct test.s storage pointer)". +// Warning: (140-144): Assertion checker does not yet implement type "type(struct test.s memory[7] memory)". +// Warning: (156-163): Assertion checker does not yet implement type "type(uint256[7] memory)". diff --git a/test/libsolidity/smtCheckerTests/types/struct_1.sol b/test/libsolidity/smtCheckerTests/types/struct_1.sol index 89c10c73c..cd198b53d 100644 --- a/test/libsolidity/smtCheckerTests/types/struct_1.sol +++ b/test/libsolidity/smtCheckerTests/types/struct_1.sol @@ -16,11 +16,11 @@ contract C // ---- // Warning: (157-170): Unused local variable. // Warning: (157-170): Assertion checker does not yet support the type of this variable. -// Warning: (139-146): Assertion checker does not yet implement type struct C.S storage ref -// Warning: (149-150): Assertion checker does not yet implement type type(struct C.S storage pointer) -// Warning: (149-153): Assertion checker does not yet implement type struct C.S memory +// Warning: (139-146): Assertion checker does not yet implement type "struct C.S storage ref". +// Warning: (149-150): Assertion checker does not yet implement type "type(struct C.S storage pointer)". +// Warning: (149-153): Assertion checker does not yet implement type "struct C.S memory". // Warning: (149-153): Assertion checker does not yet implement this expression. -// Warning: (139-153): Assertion checker does not yet implement type struct C.S storage ref -// Warning: (173-174): Assertion checker does not yet implement type type(struct C.S storage pointer) -// Warning: (173-177): Assertion checker does not yet implement type struct C.S memory +// Warning: (139-153): Assertion checker does not yet implement type "struct C.S storage ref". +// Warning: (173-174): Assertion checker does not yet implement type "type(struct C.S storage pointer)". +// Warning: (173-177): Assertion checker does not yet implement type "struct C.S memory". // Warning: (173-177): Assertion checker does not yet implement this expression. diff --git a/test/libsolidity/smtCheckerTests/types/struct_array_branches_1d.sol b/test/libsolidity/smtCheckerTests/types/struct_array_branches_1d.sol index 295e98788..17b98eb87 100644 --- a/test/libsolidity/smtCheckerTests/types/struct_array_branches_1d.sol +++ b/test/libsolidity/smtCheckerTests/types/struct_array_branches_1d.sol @@ -14,21 +14,21 @@ contract C } } // ---- -// Warning: (71-197): Function state mutability can be restricted to pure +// Warning: (71-197): Function state mutability can be restricted to "pure". // Warning: (101-111): Assertion checker does not yet support the type of this variable. // Warning: (115-118): Assertion checker does not yet support this expression. -// Warning: (115-116): Assertion checker does not yet implement type struct C.S memory +// Warning: (115-116): Assertion checker does not yet implement type "struct C.S memory". // Warning: (115-121): Assertion checker does not yet implement this expression. // Warning: (115-121): Assertion checker does not yet implement this expression. // Warning: (139-142): Assertion checker does not yet support this expression. -// Warning: (139-140): Assertion checker does not yet implement type struct C.S memory +// Warning: (139-140): Assertion checker does not yet implement type "struct C.S memory". // Warning: (139-145): Assertion checker does not yet implement this expression. // Warning: (139-145): Assertion checker does not yet implement this expression. // Warning: (161-164): Assertion checker does not yet support this expression. -// Warning: (161-162): Assertion checker does not yet implement type struct C.S memory +// Warning: (161-162): Assertion checker does not yet implement type "struct C.S memory". // Warning: (161-167): Assertion checker does not yet implement this expression. // Warning: (161-167): Assertion checker does not yet implement this expression. // Warning: (182-185): Assertion checker does not yet support this expression. -// Warning: (182-183): Assertion checker does not yet implement type struct C.S memory +// Warning: (182-183): Assertion checker does not yet implement type "struct C.S memory". // Warning: (182-188): Assertion checker does not yet implement this expression. // Warning: (175-193): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/types/struct_array_branches_2d.sol b/test/libsolidity/smtCheckerTests/types/struct_array_branches_2d.sol index fe5fca87f..5554d58ba 100644 --- a/test/libsolidity/smtCheckerTests/types/struct_array_branches_2d.sol +++ b/test/libsolidity/smtCheckerTests/types/struct_array_branches_2d.sol @@ -14,21 +14,21 @@ contract C } } // ---- -// Warning: (73-211): Function state mutability can be restricted to pure +// Warning: (73-211): Function state mutability can be restricted to "pure". // Warning: (103-113): Assertion checker does not yet support the type of this variable. // Warning: (117-120): Assertion checker does not yet support this expression. -// Warning: (117-118): Assertion checker does not yet implement type struct C.S memory +// Warning: (117-118): Assertion checker does not yet implement type "struct C.S memory". // Warning: (117-123): Assertion checker does not yet implement this expression. // Warning: (117-126): Assertion checker does not yet implement this expression. // Warning: (144-147): Assertion checker does not yet support this expression. -// Warning: (144-145): Assertion checker does not yet implement type struct C.S memory +// Warning: (144-145): Assertion checker does not yet implement type "struct C.S memory". // Warning: (144-150): Assertion checker does not yet implement this expression. // Warning: (144-153): Assertion checker does not yet implement this expression. // Warning: (169-172): Assertion checker does not yet support this expression. -// Warning: (169-170): Assertion checker does not yet implement type struct C.S memory +// Warning: (169-170): Assertion checker does not yet implement type "struct C.S memory". // Warning: (169-175): Assertion checker does not yet implement this expression. // Warning: (169-178): Assertion checker does not yet implement this expression. // Warning: (193-196): Assertion checker does not yet support this expression. -// Warning: (193-194): Assertion checker does not yet implement type struct C.S memory +// Warning: (193-194): Assertion checker does not yet implement type "struct C.S memory". // Warning: (193-199): Assertion checker does not yet implement this expression. // Warning: (186-207): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/types/struct_array_branches_3d.sol b/test/libsolidity/smtCheckerTests/types/struct_array_branches_3d.sol index c91e163ba..a84bfb770 100644 --- a/test/libsolidity/smtCheckerTests/types/struct_array_branches_3d.sol +++ b/test/libsolidity/smtCheckerTests/types/struct_array_branches_3d.sol @@ -16,18 +16,18 @@ contract C // ---- // Warning: (110-120): Assertion checker does not yet support the type of this variable. // Warning: (124-127): Assertion checker does not yet support this expression. -// Warning: (124-125): Assertion checker does not yet implement type struct C.S memory +// Warning: (124-125): Assertion checker does not yet implement type "struct C.S memory". // Warning: (124-130): Assertion checker does not yet implement this expression. // Warning: (124-136): Assertion checker does not yet implement this expression. // Warning: (154-157): Assertion checker does not yet support this expression. -// Warning: (154-155): Assertion checker does not yet implement type struct C.S memory +// Warning: (154-155): Assertion checker does not yet implement type "struct C.S memory". // Warning: (154-160): Assertion checker does not yet implement this expression. // Warning: (154-166): Assertion checker does not yet implement this expression. // Warning: (182-185): Assertion checker does not yet support this expression. -// Warning: (182-183): Assertion checker does not yet implement type struct C.S memory +// Warning: (182-183): Assertion checker does not yet implement type "struct C.S memory". // Warning: (182-188): Assertion checker does not yet implement this expression. // Warning: (182-194): Assertion checker does not yet implement this expression. // Warning: (209-212): Assertion checker does not yet support this expression. -// Warning: (209-210): Assertion checker does not yet implement type struct C.S memory +// Warning: (209-210): Assertion checker does not yet implement type "struct C.S memory". // Warning: (209-215): Assertion checker does not yet implement this expression. // Warning: (202-226): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/types/tuple_return_branch.sol b/test/libsolidity/smtCheckerTests/types/tuple_return_branch.sol index 1a266aaa7..af0b6de60 100644 --- a/test/libsolidity/smtCheckerTests/types/tuple_return_branch.sol +++ b/test/libsolidity/smtCheckerTests/types/tuple_return_branch.sol @@ -15,11 +15,11 @@ contract C { } // ---- // Warning: (112-120): Assertion checker does not yet support the type of this variable. -// Warning: (137-138): Assertion checker does not yet implement type type(struct C.S storage pointer) -// Warning: (137-141): Assertion checker does not yet implement type struct C.S memory +// Warning: (137-138): Assertion checker does not yet implement type "type(struct C.S storage pointer)". +// Warning: (137-141): Assertion checker does not yet implement type "struct C.S memory". // Warning: (137-141): Assertion checker does not yet implement this expression. // Warning: (193-203): Assertion checker does not yet support the type of this variable. -// Warning: (137-138): Assertion checker does not yet implement type type(struct C.S storage pointer) -// Warning: (137-141): Assertion checker does not yet implement type struct C.S memory +// Warning: (137-138): Assertion checker does not yet implement type "type(struct C.S storage pointer)". +// Warning: (137-141): Assertion checker does not yet implement type "struct C.S memory". // Warning: (137-141): Assertion checker does not yet implement this expression. -// Warning: (227-228): Assertion checker does not yet implement type struct C.S memory +// Warning: (227-228): Assertion checker does not yet implement type "struct C.S memory". diff --git a/test/libsolidity/smtCheckerTests/types/type_expression_array_2d.sol b/test/libsolidity/smtCheckerTests/types/type_expression_array_2d.sol index 2bd64030d..c1fec61d8 100644 --- a/test/libsolidity/smtCheckerTests/types/type_expression_array_2d.sol +++ b/test/libsolidity/smtCheckerTests/types/type_expression_array_2d.sol @@ -6,5 +6,5 @@ function f() public pure { int[][]; } } // ---- // Warning: (73-80): Statement has no effect. -// Warning: (73-78): Assertion checker does not yet implement type type(int256[] memory) -// Warning: (73-80): Assertion checker does not yet implement type type(int256[] memory[] memory) +// Warning: (73-78): Assertion checker does not yet implement type "type(int256[] memory)". +// Warning: (73-80): Assertion checker does not yet implement type "type(int256[] memory[] memory)". diff --git a/test/libsolidity/smtCheckerTests/types/type_expression_array_3d.sol b/test/libsolidity/smtCheckerTests/types/type_expression_array_3d.sol index 3f0967caf..a9be169b7 100644 --- a/test/libsolidity/smtCheckerTests/types/type_expression_array_3d.sol +++ b/test/libsolidity/smtCheckerTests/types/type_expression_array_3d.sol @@ -6,6 +6,6 @@ function f() public pure { int[][][]; } } // ---- // Warning: (73-82): Statement has no effect. -// Warning: (73-78): Assertion checker does not yet implement type type(int256[] memory) -// Warning: (73-80): Assertion checker does not yet implement type type(int256[] memory[] memory) -// Warning: (73-82): Assertion checker does not yet implement type type(int256[] memory[] memory[] memory) +// Warning: (73-78): Assertion checker does not yet implement type "type(int256[] memory)". +// Warning: (73-80): Assertion checker does not yet implement type "type(int256[] memory[] memory)". +// Warning: (73-82): Assertion checker does not yet implement type "type(int256[] memory[] memory[] memory)". diff --git a/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_2d.sol b/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_2d.sol index e648b5d6d..f8165999d 100644 --- a/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_2d.sol +++ b/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_2d.sol @@ -6,6 +6,6 @@ function f() public pure { (int[][]); } } // ---- // Warning: (73-82): Statement has no effect. -// Warning: (74-79): Assertion checker does not yet implement type type(int256[] memory) -// Warning: (74-81): Assertion checker does not yet implement type type(int256[] memory[] memory) -// Warning: (73-82): Assertion checker does not yet implement type type(int256[] memory[] memory) +// Warning: (74-79): Assertion checker does not yet implement type "type(int256[] memory)". +// Warning: (74-81): Assertion checker does not yet implement type "type(int256[] memory[] memory)". +// Warning: (73-82): Assertion checker does not yet implement type "type(int256[] memory[] memory)". diff --git a/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_3d.sol b/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_3d.sol index 2d66a3bb2..04cdc055a 100644 --- a/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_3d.sol +++ b/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_3d.sol @@ -6,7 +6,7 @@ function f() public pure { (int[][][]); } } // ---- // Warning: (73-84): Statement has no effect. -// Warning: (74-79): Assertion checker does not yet implement type type(int256[] memory) -// Warning: (74-81): Assertion checker does not yet implement type type(int256[] memory[] memory) -// Warning: (74-83): Assertion checker does not yet implement type type(int256[] memory[] memory[] memory) -// Warning: (73-84): Assertion checker does not yet implement type type(int256[] memory[] memory[] memory) +// Warning: (74-79): Assertion checker does not yet implement type "type(int256[] memory)". +// Warning: (74-81): Assertion checker does not yet implement type "type(int256[] memory[] memory)". +// Warning: (74-83): Assertion checker does not yet implement type "type(int256[] memory[] memory[] memory)". +// Warning: (73-84): Assertion checker does not yet implement type "type(int256[] memory[] memory[] memory)". diff --git a/test/libsolidity/syntaxTests/array/dynamic_memory_array_pop.sol b/test/libsolidity/syntaxTests/array/dynamic_memory_array_pop.sol index 5a79afc93..16791250b 100644 --- a/test/libsolidity/syntaxTests/array/dynamic_memory_array_pop.sol +++ b/test/libsolidity/syntaxTests/array/dynamic_memory_array_pop.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (74-82): Member "pop" is not available in uint256[] memory outside of storage. +// TypeError: (74-82): Member "pop" is not available in "uint256[] memory" outside of storage. diff --git a/test/libsolidity/syntaxTests/array/length/invalid_expression_5.sol b/test/libsolidity/syntaxTests/array/length/invalid_expression_5.sol index 38a80867d..b7b28b18f 100644 --- a/test/libsolidity/syntaxTests/array/length/invalid_expression_5.sol +++ b/test/libsolidity/syntaxTests/array/length/invalid_expression_5.sol @@ -2,4 +2,4 @@ contract C { uint[3/0] ids; } // ---- -// TypeError: (22-25): Operator / not compatible with types int_const 3 and int_const 0 +// TypeError: (22-25): Operator "/" not compatible with types "int_const 3" and "int_const 0". diff --git a/test/libsolidity/syntaxTests/array/no_array_pop.sol b/test/libsolidity/syntaxTests/array/no_array_pop.sol index 79a68ef12..af99a2f49 100644 --- a/test/libsolidity/syntaxTests/array/no_array_pop.sol +++ b/test/libsolidity/syntaxTests/array/no_array_pop.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (63-71): Member "pop" not found or not visible after argument-dependent lookup in uint256. +// TypeError: (63-71): Member "pop" not found or not visible after argument-dependent lookup in "uint256". diff --git a/test/libsolidity/syntaxTests/array/pop/calldata_pop.sol b/test/libsolidity/syntaxTests/array/pop/calldata_pop.sol index ca11428ee..762688d5f 100644 --- a/test/libsolidity/syntaxTests/array/pop/calldata_pop.sol +++ b/test/libsolidity/syntaxTests/array/pop/calldata_pop.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (66-71): Member "pop" is not available in uint256[] calldata outside of storage. +// TypeError: (66-71): Member "pop" is not available in "uint256[] calldata" outside of storage. diff --git a/test/libsolidity/syntaxTests/array/pop/memory_pop.sol b/test/libsolidity/syntaxTests/array/pop/memory_pop.sol index 8984341aa..bdf52cb08 100644 --- a/test/libsolidity/syntaxTests/array/pop/memory_pop.sol +++ b/test/libsolidity/syntaxTests/array/pop/memory_pop.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (72-77): Member "pop" is not available in uint256[] memory outside of storage. +// TypeError: (72-77): Member "pop" is not available in "uint256[] memory" outside of storage. diff --git a/test/libsolidity/syntaxTests/array/push/calldata_push.sol b/test/libsolidity/syntaxTests/array/push/calldata_push.sol index fb46bf328..cfe6add54 100644 --- a/test/libsolidity/syntaxTests/array/push/calldata_push.sol +++ b/test/libsolidity/syntaxTests/array/push/calldata_push.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (66-72): Member "push" is not available in uint256[] calldata outside of storage. +// TypeError: (66-72): Member "push" is not available in "uint256[] calldata" outside of storage. diff --git a/test/libsolidity/syntaxTests/array/push/memory_push.sol b/test/libsolidity/syntaxTests/array/push/memory_push.sol index 5e0890e63..2fd4708a8 100644 --- a/test/libsolidity/syntaxTests/array/push/memory_push.sol +++ b/test/libsolidity/syntaxTests/array/push/memory_push.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (72-78): Member "push" is not available in uint256[] memory outside of storage. +// TypeError: (72-78): Member "push" is not available in "uint256[] memory" outside of storage. diff --git a/test/libsolidity/syntaxTests/array/slice/calldata_dynamic_convert_to_memory.sol b/test/libsolidity/syntaxTests/array/slice/calldata_dynamic_convert_to_memory.sol index a3e2fccc1..f56ca41c3 100644 --- a/test/libsolidity/syntaxTests/array/slice/calldata_dynamic_convert_to_memory.sol +++ b/test/libsolidity/syntaxTests/array/slice/calldata_dynamic_convert_to_memory.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (65-88): Type bytes calldata slice is not implicitly convertible to expected type bytes memory. +// TypeError: (65-88): Type "bytes calldata slice" is not implicitly convertible to expected type "bytes memory". diff --git a/test/libsolidity/syntaxTests/array/slice/calldata_dynamic_forward.sol b/test/libsolidity/syntaxTests/array/slice/calldata_dynamic_forward.sol index a2d6e0f02..95371d8c2 100644 --- a/test/libsolidity/syntaxTests/array/slice/calldata_dynamic_forward.sol +++ b/test/libsolidity/syntaxTests/array/slice/calldata_dynamic_forward.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (79-85): Invalid type for argument in function call. Invalid implicit conversion from bytes calldata slice to bytes memory requested. +// TypeError: (79-85): Invalid type for argument in function call. Invalid implicit conversion from "bytes calldata slice" to "bytes memory" requested. diff --git a/test/libsolidity/syntaxTests/array/static_storage_array_pop.sol b/test/libsolidity/syntaxTests/array/static_storage_array_pop.sol index 8414f43dd..22f90fa86 100644 --- a/test/libsolidity/syntaxTests/array/static_storage_array_pop.sol +++ b/test/libsolidity/syntaxTests/array/static_storage_array_pop.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (66-74): Member "pop" not found or not visible after argument-dependent lookup in uint256[3] storage ref. +// TypeError: (66-74): Member "pop" not found or not visible after argument-dependent lookup in "uint256[3] storage ref". diff --git a/test/libsolidity/syntaxTests/array/string_pop.sol b/test/libsolidity/syntaxTests/array/string_pop.sol index 700fda16a..e52dac4c9 100644 --- a/test/libsolidity/syntaxTests/array/string_pop.sol +++ b/test/libsolidity/syntaxTests/array/string_pop.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (65-73): Member "pop" not found or not visible after argument-dependent lookup in string storage ref. +// TypeError: (65-73): Member "pop" not found or not visible after argument-dependent lookup in "string storage ref". diff --git a/test/libsolidity/syntaxTests/constants/addmod_mulmod_rational.sol b/test/libsolidity/syntaxTests/constants/addmod_mulmod_rational.sol index 267127356..a2ba4a718 100644 --- a/test/libsolidity/syntaxTests/constants/addmod_mulmod_rational.sol +++ b/test/libsolidity/syntaxTests/constants/addmod_mulmod_rational.sol @@ -3,5 +3,5 @@ contract C { uint constant b = mulmod(3, 4, 0.1); } // ---- -// TypeError: (48-51): Invalid type for argument in function call. Invalid implicit conversion from rational_const 1 / 10 to uint256 requested. -// TypeError: (89-92): Invalid type for argument in function call. Invalid implicit conversion from rational_const 1 / 10 to uint256 requested. +// TypeError: (48-51): Invalid type for argument in function call. Invalid implicit conversion from "rational_const 1 / 10" to "uint256" requested. +// TypeError: (89-92): Invalid type for argument in function call. Invalid implicit conversion from "rational_const 1 / 10" to "uint256" requested. diff --git a/test/libsolidity/syntaxTests/constants/cyclic_dependency_1.sol b/test/libsolidity/syntaxTests/constants/cyclic_dependency_1.sol index cb553fbe4..2b67af0af 100644 --- a/test/libsolidity/syntaxTests/constants/cyclic_dependency_1.sol +++ b/test/libsolidity/syntaxTests/constants/cyclic_dependency_1.sol @@ -2,4 +2,4 @@ contract C { uint constant a = a; } // ---- -// TypeError: (17-36): The value of the constant a has a cyclic dependency via a. +// TypeError: (17-36): The value of the constant "a" has a cyclic dependency via "a". diff --git a/test/libsolidity/syntaxTests/constants/cyclic_dependency_2.sol b/test/libsolidity/syntaxTests/constants/cyclic_dependency_2.sol index 9f1d97227..89da745c9 100644 --- a/test/libsolidity/syntaxTests/constants/cyclic_dependency_2.sol +++ b/test/libsolidity/syntaxTests/constants/cyclic_dependency_2.sol @@ -5,6 +5,6 @@ contract C { uint constant d = 2 + a; } // ---- -// TypeError: (17-40): The value of the constant a has a cyclic dependency via c. -// TypeError: (71-129): The value of the constant c has a cyclic dependency via d. -// TypeError: (135-158): The value of the constant d has a cyclic dependency via a. +// TypeError: (17-40): The value of the constant "a" has a cyclic dependency via "c". +// TypeError: (71-129): The value of the constant "c" has a cyclic dependency via "d". +// TypeError: (135-158): The value of the constant "d" has a cyclic dependency via "a". diff --git a/test/libsolidity/syntaxTests/constants/cyclic_dependency_3.sol b/test/libsolidity/syntaxTests/constants/cyclic_dependency_3.sol index 969ed50d3..8f607d105 100644 --- a/test/libsolidity/syntaxTests/constants/cyclic_dependency_3.sol +++ b/test/libsolidity/syntaxTests/constants/cyclic_dependency_3.sol @@ -5,7 +5,7 @@ contract C { uint constant c = b; } // ---- -// TypeError: (17-36): The value of the constant x has a cyclic dependency via a. -// TypeError: (42-65): The value of the constant a has a cyclic dependency via b. -// TypeError: (71-90): The value of the constant b has a cyclic dependency via c. -// TypeError: (96-115): The value of the constant c has a cyclic dependency via b. +// TypeError: (17-36): The value of the constant "x" has a cyclic dependency via "a". +// TypeError: (42-65): The value of the constant "a" has a cyclic dependency via "b". +// TypeError: (71-90): The value of the constant "b" has a cyclic dependency via "c". +// TypeError: (96-115): The value of the constant "c" has a cyclic dependency via "b". diff --git a/test/libsolidity/syntaxTests/constructor/overriding_constructor.sol b/test/libsolidity/syntaxTests/constructor/overriding_constructor.sol index 30cf3bce9..f4961d082 100644 --- a/test/libsolidity/syntaxTests/constructor/overriding_constructor.sol +++ b/test/libsolidity/syntaxTests/constructor/overriding_constructor.sol @@ -7,4 +7,4 @@ contract B is A { } // ---- // Warning: (58-101): This declaration shadows an existing declaration. -// TypeError: (130-133): Member "f" not found or not visible after argument-dependent lookup in function () pure returns (uint8). +// TypeError: (130-133): Member "f" not found or not visible after argument-dependent lookup in "function () pure returns (uint8)". diff --git a/test/libsolidity/syntaxTests/conversion/explicit_conversion_address_to_payable.sol b/test/libsolidity/syntaxTests/conversion/explicit_conversion_address_to_payable.sol index d44841fd7..9a5ee1d7b 100644 --- a/test/libsolidity/syntaxTests/conversion/explicit_conversion_address_to_payable.sol +++ b/test/libsolidity/syntaxTests/conversion/explicit_conversion_address_to_payable.sol @@ -8,4 +8,4 @@ contract C { } } // ---- -// TypeError: (169-171): Invalid type for argument in function call. Invalid implicit conversion from address to address payable requested. +// TypeError: (169-171): Invalid type for argument in function call. Invalid implicit conversion from "address" to "address payable" requested. diff --git a/test/libsolidity/syntaxTests/conversion/function_type_nonpayable_payable.sol b/test/libsolidity/syntaxTests/conversion/function_type_nonpayable_payable.sol index 75f7a953c..9a643b08b 100644 --- a/test/libsolidity/syntaxTests/conversion/function_type_nonpayable_payable.sol +++ b/test/libsolidity/syntaxTests/conversion/function_type_nonpayable_payable.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// TypeError: (105-144): Type function () external is not implicitly convertible to expected type function () payable external. +// TypeError: (105-144): Type "function () external" is not implicitly convertible to expected type "function () payable external". diff --git a/test/libsolidity/syntaxTests/conversion/function_type_nonpayable_pure.sol b/test/libsolidity/syntaxTests/conversion/function_type_nonpayable_pure.sol index 8d1b08aa5..28e155d89 100644 --- a/test/libsolidity/syntaxTests/conversion/function_type_nonpayable_pure.sol +++ b/test/libsolidity/syntaxTests/conversion/function_type_nonpayable_pure.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// TypeError: (105-141): Type function () external is not implicitly convertible to expected type function () pure external. +// TypeError: (105-141): Type "function () external" is not implicitly convertible to expected type "function () pure external". diff --git a/test/libsolidity/syntaxTests/conversion/function_type_nonpayable_view.sol b/test/libsolidity/syntaxTests/conversion/function_type_nonpayable_view.sol index 535d6c77b..5f46a4bb5 100644 --- a/test/libsolidity/syntaxTests/conversion/function_type_nonpayable_view.sol +++ b/test/libsolidity/syntaxTests/conversion/function_type_nonpayable_view.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// TypeError: (105-141): Type function () external is not implicitly convertible to expected type function () view external. +// TypeError: (105-141): Type "function () external" is not implicitly convertible to expected type "function () view external". diff --git a/test/libsolidity/syntaxTests/conversion/function_type_payable_pure.sol b/test/libsolidity/syntaxTests/conversion/function_type_payable_pure.sol index 78bada512..fdf171908 100644 --- a/test/libsolidity/syntaxTests/conversion/function_type_payable_pure.sol +++ b/test/libsolidity/syntaxTests/conversion/function_type_payable_pure.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// TypeError: (113-149): Type function () payable external is not implicitly convertible to expected type function () pure external. +// TypeError: (113-149): Type "function () payable external" is not implicitly convertible to expected type "function () pure external". diff --git a/test/libsolidity/syntaxTests/conversion/function_type_payable_view.sol b/test/libsolidity/syntaxTests/conversion/function_type_payable_view.sol index f12cb301b..7dad3ed76 100644 --- a/test/libsolidity/syntaxTests/conversion/function_type_payable_view.sol +++ b/test/libsolidity/syntaxTests/conversion/function_type_payable_view.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// TypeError: (113-149): Type function () payable external is not implicitly convertible to expected type function () view external. +// TypeError: (113-149): Type "function () payable external" is not implicitly convertible to expected type "function () view external". diff --git a/test/libsolidity/syntaxTests/conversion/function_type_pure_payable.sol b/test/libsolidity/syntaxTests/conversion/function_type_pure_payable.sol index cd4e9b4e6..be9a16754 100644 --- a/test/libsolidity/syntaxTests/conversion/function_type_pure_payable.sol +++ b/test/libsolidity/syntaxTests/conversion/function_type_pure_payable.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// TypeError: (110-149): Type function () pure external is not implicitly convertible to expected type function () payable external. +// TypeError: (110-149): Type "function () pure external" is not implicitly convertible to expected type "function () payable external". diff --git a/test/libsolidity/syntaxTests/conversion/function_type_view_payable.sol b/test/libsolidity/syntaxTests/conversion/function_type_view_payable.sol index 3bf4bac2a..e96f0262e 100644 --- a/test/libsolidity/syntaxTests/conversion/function_type_view_payable.sol +++ b/test/libsolidity/syntaxTests/conversion/function_type_view_payable.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// TypeError: (110-149): Type function () view external is not implicitly convertible to expected type function () payable external. +// TypeError: (110-149): Type "function () view external" is not implicitly convertible to expected type "function () payable external". diff --git a/test/libsolidity/syntaxTests/conversion/function_type_view_pure.sol b/test/libsolidity/syntaxTests/conversion/function_type_view_pure.sol index c567a2c8d..0aadfc4d9 100644 --- a/test/libsolidity/syntaxTests/conversion/function_type_view_pure.sol +++ b/test/libsolidity/syntaxTests/conversion/function_type_view_pure.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// TypeError: (110-146): Type function () view external is not implicitly convertible to expected type function () pure external. +// TypeError: (110-146): Type "function () view external" is not implicitly convertible to expected type "function () pure external". diff --git a/test/libsolidity/syntaxTests/dataLocations/memory_storage_data_location.sol b/test/libsolidity/syntaxTests/dataLocations/memory_storage_data_location.sol index a441b5407..5aa911299 100644 --- a/test/libsolidity/syntaxTests/dataLocations/memory_storage_data_location.sol +++ b/test/libsolidity/syntaxTests/dataLocations/memory_storage_data_location.sol @@ -8,5 +8,5 @@ contract C { } } // ---- -// TypeError: (93-94): Type int256[] memory is not implicitly convertible to expected type int256[] storage pointer. -// TypeError: (102-110): Type int256[] memory is not implicitly convertible to expected type int256[] storage pointer. +// TypeError: (93-94): Type "int256[] memory" is not implicitly convertible to expected type "int256[] storage pointer". +// TypeError: (102-110): Type "int256[] memory" is not implicitly convertible to expected type "int256[] storage pointer". diff --git a/test/libsolidity/syntaxTests/denominations/fixed_point_division.sol b/test/libsolidity/syntaxTests/denominations/fixed_point_division.sol index 22331b51b..176a52230 100644 --- a/test/libsolidity/syntaxTests/denominations/fixed_point_division.sol +++ b/test/libsolidity/syntaxTests/denominations/fixed_point_division.sol @@ -3,4 +3,4 @@ contract C { ufixed constant b = ufixed(4 ether / 3 hours); } // ---- -// TypeError: (32-49): Type rational_const 10000000000000000 / 27 is not implicitly convertible to expected type uint256. Try converting to type ufixed256x62 or use an explicit conversion. +// TypeError: (32-49): Type "rational_const 10000000000000000 / 27" is not implicitly convertible to expected type "uint256". Try converting to type "ufixed256x62" or use an explicit conversion. diff --git a/test/libsolidity/syntaxTests/functionCalls/arbitrary_parameters_but_restricted_first_type.sol b/test/libsolidity/syntaxTests/functionCalls/arbitrary_parameters_but_restricted_first_type.sol index 94da5881d..6fcbb542d 100644 --- a/test/libsolidity/syntaxTests/functionCalls/arbitrary_parameters_but_restricted_first_type.sol +++ b/test/libsolidity/syntaxTests/functionCalls/arbitrary_parameters_but_restricted_first_type.sol @@ -9,5 +9,5 @@ contract C { // ---- // TypeError: (52-76): Need at least 1 arguments for function call, but provided only 0. // TypeError: (86-111): Need at least 1 arguments for function call, but provided only 0. -// TypeError: (144-151): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes4 requested. -// TypeError: (189-196): Invalid type for argument in function call. Invalid implicit conversion from uint256 to string memory requested. +// TypeError: (144-151): Invalid type for argument in function call. Invalid implicit conversion from "uint256" to "bytes4" requested. +// TypeError: (189-196): Invalid type for argument in function call. Invalid implicit conversion from "uint256" to "string memory" requested. diff --git a/test/libsolidity/syntaxTests/functionTypes/conversion_to_address.sol b/test/libsolidity/syntaxTests/functionTypes/conversion_to_address.sol index 703d6c89f..334e85de6 100644 --- a/test/libsolidity/syntaxTests/functionTypes/conversion_to_address.sol +++ b/test/libsolidity/syntaxTests/functionTypes/conversion_to_address.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (77-92): Explicit type conversion not allowed from "function () view external returns (address)" to "address". To obtain the address of the contract of the function, you can use the .address member of the function. +// TypeError: (77-92): Explicit type conversion not allowed from "function () view external returns (address)" to "address". To obtain the address of the contract of the function, you can use the ".address" member of the function. diff --git a/test/libsolidity/syntaxTests/functionTypes/external_function_type_to_address_payable.sol b/test/libsolidity/syntaxTests/functionTypes/external_function_type_to_address_payable.sol index 0cd7764f5..8414b3dd1 100644 --- a/test/libsolidity/syntaxTests/functionTypes/external_function_type_to_address_payable.sol +++ b/test/libsolidity/syntaxTests/functionTypes/external_function_type_to_address_payable.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (85-99): Return argument type address is not implicitly convertible to expected type (type of first return variable) address payable. +// TypeError: (85-99): Return argument type "address" is not implicitly convertible to expected type (type of first return variable) "address payable". diff --git a/test/libsolidity/syntaxTests/functionTypes/function_type_variable_external_internal.sol b/test/libsolidity/syntaxTests/functionTypes/function_type_variable_external_internal.sol index f02404724..8dd9beff3 100644 --- a/test/libsolidity/syntaxTests/functionTypes/function_type_variable_external_internal.sol +++ b/test/libsolidity/syntaxTests/functionTypes/function_type_variable_external_internal.sol @@ -3,4 +3,4 @@ contract test { function(bytes memory) external internal a = fa; } // ---- -// TypeError: (106-108): Type function (bytes memory) is not implicitly convertible to expected type function (bytes memory) external. +// TypeError: (106-108): Type "function (bytes memory)" is not implicitly convertible to expected type "function (bytes memory) external". diff --git a/test/libsolidity/syntaxTests/globalFunctions/call_with_wrong_arg_count.sol b/test/libsolidity/syntaxTests/globalFunctions/call_with_wrong_arg_count.sol index 92ec4eb7f..82fb90311 100644 --- a/test/libsolidity/syntaxTests/globalFunctions/call_with_wrong_arg_count.sol +++ b/test/libsolidity/syntaxTests/globalFunctions/call_with_wrong_arg_count.sol @@ -12,6 +12,6 @@ contract C { } // ---- // TypeError: (65-85): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use "" as argument to provide empty calldata. -// TypeError: (153-171): Invalid type for argument in function call. Invalid implicit conversion from bytes4 to bytes memory requested. This function requires a single bytes argument. If all your arguments are value types, you can use abi.encode(...) to properly generate it. -// TypeError: (240-247): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. If all your arguments are value types, you can use abi.encode(...) to properly generate it. -// TypeError: (297-333): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. If all your arguments are value types, you can use abi.encode(...) to properly generate it. +// TypeError: (153-171): Invalid type for argument in function call. Invalid implicit conversion from "bytes4" to "bytes memory" requested. This function requires a single "bytes" argument. If all your arguments are value types, you can use "abi.encode(...)" to properly generate it. +// TypeError: (240-247): Invalid type for argument in function call. Invalid implicit conversion from "uint256" to "bytes memory" requested. This function requires a single "bytes" argument. If all your arguments are value types, you can use "abi.encode(...)" to properly generate it. +// TypeError: (297-333): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. If all your arguments are value types, you can use "abi.encode(...)" to properly generate it. diff --git a/test/libsolidity/syntaxTests/globalFunctions/callcode_with_wrong_arg_count.sol b/test/libsolidity/syntaxTests/globalFunctions/callcode_with_wrong_arg_count.sol index 655d5f4c2..d532b9fb1 100644 --- a/test/libsolidity/syntaxTests/globalFunctions/callcode_with_wrong_arg_count.sol +++ b/test/libsolidity/syntaxTests/globalFunctions/callcode_with_wrong_arg_count.sol @@ -10,5 +10,5 @@ contract C { } // ---- // TypeError: (65-89): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use "" as argument to provide empty calldata. -// TypeError: (161-168): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. If all your arguments are value types, you can use abi.encode(...) to properly generate it. -// TypeError: (218-258): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. If all your arguments are value types, you can use abi.encode(...) to properly generate it. +// TypeError: (161-168): Invalid type for argument in function call. Invalid implicit conversion from "uint256" to "bytes memory" requested. This function requires a single "bytes" argument. If all your arguments are value types, you can use "abi.encode(...)" to properly generate it. +// TypeError: (218-258): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. If all your arguments are value types, you can use "abi.encode(...)" to properly generate it. diff --git a/test/libsolidity/syntaxTests/globalFunctions/delegatecall_with_wrong_arg_count.sol b/test/libsolidity/syntaxTests/globalFunctions/delegatecall_with_wrong_arg_count.sol index fa524b99e..cab212469 100644 --- a/test/libsolidity/syntaxTests/globalFunctions/delegatecall_with_wrong_arg_count.sol +++ b/test/libsolidity/syntaxTests/globalFunctions/delegatecall_with_wrong_arg_count.sol @@ -10,5 +10,5 @@ contract C { } // ---- // TypeError: (65-93): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use "" as argument to provide empty calldata. -// TypeError: (169-176): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. If all your arguments are value types, you can use abi.encode(...) to properly generate it. -// TypeError: (226-270): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. If all your arguments are value types, you can use abi.encode(...) to properly generate it. +// TypeError: (169-176): Invalid type for argument in function call. Invalid implicit conversion from "uint256" to "bytes memory" requested. This function requires a single "bytes" argument. If all your arguments are value types, you can use "abi.encode(...)" to properly generate it. +// TypeError: (226-270): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. If all your arguments are value types, you can use "abi.encode(...)" to properly generate it. diff --git a/test/libsolidity/syntaxTests/globalFunctions/keccak256_with_wrong_arg_count.sol b/test/libsolidity/syntaxTests/globalFunctions/keccak256_with_wrong_arg_count.sol index 4857bc2e4..8dce6cbc3 100644 --- a/test/libsolidity/syntaxTests/globalFunctions/keccak256_with_wrong_arg_count.sol +++ b/test/libsolidity/syntaxTests/globalFunctions/keccak256_with_wrong_arg_count.sol @@ -6,6 +6,6 @@ contract C { } } // ---- -// TypeError: (55-66): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. -// TypeError: (100-107): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. -// TypeError: (132-159): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. +// TypeError: (55-66): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or "abi.encode(...)" to use ABI encoding. +// TypeError: (100-107): Invalid type for argument in function call. Invalid implicit conversion from "uint256" to "bytes memory" requested. This function requires a single "bytes" argument. Use "abi.encodePacked(...)" to obtain the pre-0.5.0 behaviour or "abi.encode(...)" to use ABI encoding. +// TypeError: (132-159): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or "abi.encode(...)" to use ABI encoding. diff --git a/test/libsolidity/syntaxTests/globalFunctions/ripemd160_with_wrong_arg_count.sol b/test/libsolidity/syntaxTests/globalFunctions/ripemd160_with_wrong_arg_count.sol index da41fccd3..ecf992d98 100644 --- a/test/libsolidity/syntaxTests/globalFunctions/ripemd160_with_wrong_arg_count.sol +++ b/test/libsolidity/syntaxTests/globalFunctions/ripemd160_with_wrong_arg_count.sol @@ -6,6 +6,6 @@ contract C { } } // ---- -// TypeError: (55-66): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. -// TypeError: (100-107): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. -// TypeError: (132-159): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. +// TypeError: (55-66): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or "abi.encode(...)" to use ABI encoding. +// TypeError: (100-107): Invalid type for argument in function call. Invalid implicit conversion from "uint256" to "bytes memory" requested. This function requires a single "bytes" argument. Use "abi.encodePacked(...)" to obtain the pre-0.5.0 behaviour or "abi.encode(...)" to use ABI encoding. +// TypeError: (132-159): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or "abi.encode(...)" to use ABI encoding. diff --git a/test/libsolidity/syntaxTests/globalFunctions/sha256_with_wrong_arg_count.sol b/test/libsolidity/syntaxTests/globalFunctions/sha256_with_wrong_arg_count.sol index 2939e7fcb..c5f8c72cd 100644 --- a/test/libsolidity/syntaxTests/globalFunctions/sha256_with_wrong_arg_count.sol +++ b/test/libsolidity/syntaxTests/globalFunctions/sha256_with_wrong_arg_count.sol @@ -6,6 +6,6 @@ contract C { } } // ---- -// TypeError: (55-63): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. -// TypeError: (94-101): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. -// TypeError: (126-150): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. +// TypeError: (55-63): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or "abi.encode(...)" to use ABI encoding. +// TypeError: (94-101): Invalid type for argument in function call. Invalid implicit conversion from "uint256" to "bytes memory" requested. This function requires a single "bytes" argument. Use "abi.encodePacked(...)" to obtain the pre-0.5.0 behaviour or "abi.encode(...)" to use ABI encoding. +// TypeError: (126-150): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or "abi.encode(...)" to use ABI encoding. diff --git a/test/libsolidity/syntaxTests/indexing/array_multidim_rational.sol b/test/libsolidity/syntaxTests/indexing/array_multidim_rational.sol index df9f8223b..df04f134c 100644 --- a/test/libsolidity/syntaxTests/indexing/array_multidim_rational.sol +++ b/test/libsolidity/syntaxTests/indexing/array_multidim_rational.sol @@ -5,7 +5,7 @@ contract C { } } // ---- -// TypeError: (67-72): Type int_const 1897...(74 digits omitted)...1424 is not implicitly convertible to expected type uint256. -// TypeError: (74-79): Type int_const 1897...(74 digits omitted)...1424 is not implicitly convertible to expected type uint256. -// TypeError: (81-90): Type rational_const 9485...(73 digits omitted)...5712 / 5 is not implicitly convertible to expected type uint256. +// TypeError: (67-72): Type "int_const 1897...(74 digits omitted)...1424" is not implicitly convertible to expected type "uint256". +// TypeError: (74-79): Type "int_const 1897...(74 digits omitted)...1424" is not implicitly convertible to expected type "uint256". +// TypeError: (81-90): Type "rational_const 9485...(73 digits omitted)...5712 / 5" is not implicitly convertible to expected type "uint256". // TypeError: (65-91): Index expression cannot be represented as an unsigned integer. diff --git a/test/libsolidity/syntaxTests/indexing/array_multim_overflow_index.sol b/test/libsolidity/syntaxTests/indexing/array_multim_overflow_index.sol index 9c98ad451..054668ab6 100644 --- a/test/libsolidity/syntaxTests/indexing/array_multim_overflow_index.sol +++ b/test/libsolidity/syntaxTests/indexing/array_multim_overflow_index.sol @@ -5,7 +5,7 @@ contract C { } } // ---- -// TypeError: (67-72): Type int_const 1897...(74 digits omitted)...1424 is not implicitly convertible to expected type uint256. -// TypeError: (74-79): Type int_const 1897...(74 digits omitted)...1424 is not implicitly convertible to expected type uint256. -// TypeError: (81-90): Type int_const -189...(75 digits omitted)...1423 is not implicitly convertible to expected type uint256. +// TypeError: (67-72): Type "int_const 1897...(74 digits omitted)...1424" is not implicitly convertible to expected type "uint256". +// TypeError: (74-79): Type "int_const 1897...(74 digits omitted)...1424" is not implicitly convertible to expected type "uint256". +// TypeError: (81-90): Type "int_const -189...(75 digits omitted)...1423" is not implicitly convertible to expected type "uint256". // TypeError: (65-91): Index expression cannot be represented as an unsigned integer. diff --git a/test/libsolidity/syntaxTests/indexing/array_negative_index.sol b/test/libsolidity/syntaxTests/indexing/array_negative_index.sol index 019d023b5..5f3ea41f7 100644 --- a/test/libsolidity/syntaxTests/indexing/array_negative_index.sol +++ b/test/libsolidity/syntaxTests/indexing/array_negative_index.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (67-69): Type int_const -1 is not implicitly convertible to expected type uint256. +// TypeError: (67-69): Type "int_const -1" is not implicitly convertible to expected type "uint256". diff --git a/test/libsolidity/syntaxTests/indexing/array_noninteger_index.sol b/test/libsolidity/syntaxTests/indexing/array_noninteger_index.sol index 7c0ac9fe2..a5b61a81f 100644 --- a/test/libsolidity/syntaxTests/indexing/array_noninteger_index.sol +++ b/test/libsolidity/syntaxTests/indexing/array_noninteger_index.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (67-178): Type int_const 8888...(103 digits omitted)...8888 is not implicitly convertible to expected type uint256. +// TypeError: (67-178): Type "int_const 8888...(103 digits omitted)...8888" is not implicitly convertible to expected type "uint256". diff --git a/test/libsolidity/syntaxTests/indexing/fixedbytes_negative_index.sol b/test/libsolidity/syntaxTests/indexing/fixedbytes_negative_index.sol index 123993178..4d64034cb 100644 --- a/test/libsolidity/syntaxTests/indexing/fixedbytes_negative_index.sol +++ b/test/libsolidity/syntaxTests/indexing/fixedbytes_negative_index.sol @@ -5,5 +5,5 @@ contract C { } } // ---- -// TypeError: (58-60): Type int_const -1 is not implicitly convertible to expected type uint256. +// TypeError: (58-60): Type "int_const -1" is not implicitly convertible to expected type "uint256". // TypeError: (56-61): Index expression cannot be represented as an unsigned integer. diff --git a/test/libsolidity/syntaxTests/indexing/fixedbytes_noninteger_index.sol b/test/libsolidity/syntaxTests/indexing/fixedbytes_noninteger_index.sol index adf7db61b..9f4cda52a 100644 --- a/test/libsolidity/syntaxTests/indexing/fixedbytes_noninteger_index.sol +++ b/test/libsolidity/syntaxTests/indexing/fixedbytes_noninteger_index.sol @@ -5,5 +5,5 @@ contract C { } } // ---- -// TypeError: (58-169): Type int_const 8888...(103 digits omitted)...8888 is not implicitly convertible to expected type uint256. +// TypeError: (58-169): Type "int_const 8888...(103 digits omitted)...8888" is not implicitly convertible to expected type "uint256". // TypeError: (56-170): Index expression cannot be represented as an unsigned integer. diff --git a/test/libsolidity/syntaxTests/indexing/function_type.sol b/test/libsolidity/syntaxTests/indexing/function_type.sol index 6c6c06a93..c93edab97 100644 --- a/test/libsolidity/syntaxTests/indexing/function_type.sol +++ b/test/libsolidity/syntaxTests/indexing/function_type.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (41-42): Indexed expression has to be a type, mapping or array (is function ()) +// TypeError: (41-42): Indexed expression has to be a type, mapping or array (is "function ()"). diff --git a/test/libsolidity/syntaxTests/indexing/function_type_without_index.sol b/test/libsolidity/syntaxTests/indexing/function_type_without_index.sol index bf511bc94..bc2fcf598 100644 --- a/test/libsolidity/syntaxTests/indexing/function_type_without_index.sol +++ b/test/libsolidity/syntaxTests/indexing/function_type_without_index.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (41-42): Indexed expression has to be a type, mapping or array (is function ()) +// TypeError: (41-42): Indexed expression has to be a type, mapping or array (is "function ()"). diff --git a/test/libsolidity/syntaxTests/indexing/struct_array_noninteger_index.sol b/test/libsolidity/syntaxTests/indexing/struct_array_noninteger_index.sol index 59010709d..bc46e066e 100644 --- a/test/libsolidity/syntaxTests/indexing/struct_array_noninteger_index.sol +++ b/test/libsolidity/syntaxTests/indexing/struct_array_noninteger_index.sol @@ -7,4 +7,4 @@ contract test { } // ---- -// TypeError: (101-241): Type int_const 7555...(132 digits omitted)...5555 is not implicitly convertible to expected type uint256. +// TypeError: (101-241): Type "int_const 7555...(132 digits omitted)...5555" is not implicitly convertible to expected type "uint256". diff --git a/test/libsolidity/syntaxTests/inheritance/interface_virtual_warning.sol b/test/libsolidity/syntaxTests/inheritance/interface_virtual_warning.sol index 761562822..b4b113d6a 100644 --- a/test/libsolidity/syntaxTests/inheritance/interface_virtual_warning.sol +++ b/test/libsolidity/syntaxTests/inheritance/interface_virtual_warning.sol @@ -2,4 +2,4 @@ interface I { function foo() virtual external; } // ---- -// Warning: (15-47): Interface functions are implicitly "virtual" +// Warning: (15-47): Interface functions are implicitly "virtual". diff --git a/test/libsolidity/syntaxTests/inheritance/override/function_pointer.sol b/test/libsolidity/syntaxTests/inheritance/override/function_pointer.sol index 2399a9aaf..61016ec22 100644 --- a/test/libsolidity/syntaxTests/inheritance/override/function_pointer.sol +++ b/test/libsolidity/syntaxTests/inheritance/override/function_pointer.sol @@ -4,4 +4,4 @@ contract C { function() external override virtual fp3; } // ---- -// ParserError: (34-41): Expected identifier but got 'virtual' +// ParserError: (34-41): Expected identifier but got "virtual" diff --git a/test/libsolidity/syntaxTests/inheritance/override/override_empty_list.sol b/test/libsolidity/syntaxTests/inheritance/override/override_empty_list.sol index 2db86a1af..c964156e6 100644 --- a/test/libsolidity/syntaxTests/inheritance/override/override_empty_list.sol +++ b/test/libsolidity/syntaxTests/inheritance/override/override_empty_list.sol @@ -7,4 +7,4 @@ contract X is A { function test() internal override() returns (uint256); } // ---- -// ParserError: (164-165): Expected identifier but got ')' +// ParserError: (164-165): Expected identifier but got ")" diff --git a/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail1.sol b/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail1.sol index ebbf83e16..d22c02598 100644 --- a/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail1.sol +++ b/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail1.sol @@ -5,4 +5,4 @@ contract X { int public override(A,) testvar; } // ---- -// ParserError: (95-96): Expected identifier but got ')' +// ParserError: (95-96): Expected identifier but got ")" diff --git a/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail2.sol b/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail2.sol index 2c3319ac2..4346c33bf 100644 --- a/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail2.sol +++ b/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail2.sol @@ -5,4 +5,4 @@ contract X { function test() internal override(,) returns (uint256); } // ---- -// ParserError: (107-108): Expected identifier but got ',' +// ParserError: (107-108): Expected identifier but got "," diff --git a/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail3.sol b/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail3.sol index 79ab20d8b..fc7154eaa 100644 --- a/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail3.sol +++ b/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail3.sol @@ -5,4 +5,4 @@ contract X { function foo() internal override(X, address) returns (uint256); } // ---- -// ParserError: (109-116): Expected identifier but got 'address' +// ParserError: (109-116): Expected identifier but got "address" diff --git a/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail4.sol b/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail4.sol index d97fb27d6..f504426a0 100644 --- a/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail4.sol +++ b/test/libsolidity/syntaxTests/inheritance/override/override_multiple_fail4.sol @@ -5,4 +5,4 @@ contract X { int public override() testvar; } // ---- -// ParserError: (93-94): Expected identifier but got ')' +// ParserError: (93-94): Expected identifier but got ")" diff --git a/test/libsolidity/syntaxTests/inheritance/super_on_external.sol b/test/libsolidity/syntaxTests/inheritance/super_on_external.sol index 60ee3cbbe..2514e955c 100644 --- a/test/libsolidity/syntaxTests/inheritance/super_on_external.sol +++ b/test/libsolidity/syntaxTests/inheritance/super_on_external.sol @@ -7,4 +7,4 @@ contract B is A { } } // ---- -// TypeError: (123-130): Member "f" not found or not visible after argument-dependent lookup in contract super B. +// TypeError: (123-130): Member "f" not found or not visible after argument-dependent lookup in "contract super B". diff --git a/test/libsolidity/syntaxTests/inheritance/wrong_type_base_arguments.sol b/test/libsolidity/syntaxTests/inheritance/wrong_type_base_arguments.sol index de5eb346f..4810afef5 100644 --- a/test/libsolidity/syntaxTests/inheritance/wrong_type_base_arguments.sol +++ b/test/libsolidity/syntaxTests/inheritance/wrong_type_base_arguments.sol @@ -6,4 +6,4 @@ contract Derived2 is Base { constructor() Base(2) public { } } // ---- -// TypeError: (74-77): Invalid type for argument in constructor call. Invalid implicit conversion from int_const 300 to uint8 requested. Literal is too large to fit in uint8. +// TypeError: (74-77): Invalid type for argument in constructor call. Invalid implicit conversion from "int_const 300" to "uint8" requested. Literal is too large to fit in "uint8". diff --git a/test/libsolidity/syntaxTests/inlineAssembly/invalid/bare_instructions_disallowed.sol b/test/libsolidity/syntaxTests/inlineAssembly/invalid/bare_instructions_disallowed.sol index 4dd8b76df..76fd48024 100644 --- a/test/libsolidity/syntaxTests/inlineAssembly/invalid/bare_instructions_disallowed.sol +++ b/test/libsolidity/syntaxTests/inlineAssembly/invalid/bare_instructions_disallowed.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// ParserError: (95-98): Expected '(' but got identifier +// ParserError: (95-98): Expected "(" but got identifier diff --git a/test/libsolidity/syntaxTests/inlineAssembly/invalid/constant_variable_via_offset.sol b/test/libsolidity/syntaxTests/inlineAssembly/invalid/constant_variable_via_offset.sol index 0c0837295..aceb7c50c 100644 --- a/test/libsolidity/syntaxTests/inlineAssembly/invalid/constant_variable_via_offset.sol +++ b/test/libsolidity/syntaxTests/inlineAssembly/invalid/constant_variable_via_offset.sol @@ -7,4 +7,4 @@ contract test { } } // ---- -// TypeError: (112-120): The suffixes _offset and _slot can only be used on non-constant storage variables. +// TypeError: (112-120): The suffixes "_offset" and "_slot" can only be used on non-constant storage variables. diff --git a/test/libsolidity/syntaxTests/inlineAssembly/invalid/empty_function_name.sol b/test/libsolidity/syntaxTests/inlineAssembly/invalid/empty_function_name.sol index 203c84871..077703fff 100644 --- a/test/libsolidity/syntaxTests/inlineAssembly/invalid/empty_function_name.sol +++ b/test/libsolidity/syntaxTests/inlineAssembly/invalid/empty_function_name.sol @@ -6,4 +6,4 @@ contract C { } } // ---- -// ParserError: (72-73): Expected identifier but got '(' +// ParserError: (72-73): Expected identifier but got "(" diff --git a/test/libsolidity/syntaxTests/inlineAssembly/invalid/leave_items_on_tack.sol b/test/libsolidity/syntaxTests/inlineAssembly/invalid/leave_items_on_tack.sol index 5b410d4b6..f3321320a 100644 --- a/test/libsolidity/syntaxTests/inlineAssembly/invalid/leave_items_on_tack.sol +++ b/test/libsolidity/syntaxTests/inlineAssembly/invalid/leave_items_on_tack.sol @@ -6,4 +6,4 @@ contract C { } } // ---- -// TypeError: (75-83): Top-level expressions are not supposed to return values (this expression returns 1 value). Use ``pop()`` or assign them. +// TypeError: (75-83): Top-level expressions are not supposed to return values (this expression returns 1 value). Use "pop()" or assign them. diff --git a/test/libsolidity/syntaxTests/inlineAssembly/invalid/storage_assignment.sol b/test/libsolidity/syntaxTests/inlineAssembly/invalid/storage_assignment.sol index 3dfb458a1..da8624c73 100644 --- a/test/libsolidity/syntaxTests/inlineAssembly/invalid/storage_assignment.sol +++ b/test/libsolidity/syntaxTests/inlineAssembly/invalid/storage_assignment.sol @@ -7,4 +7,4 @@ contract test { } } // ---- -// TypeError: (89-90): Only local variables are supported. To access storage variables, use the _slot and _offset suffixes. +// TypeError: (89-90): Only local variables are supported. To access storage variables, use the "_slot" and "_offset" suffixes. diff --git a/test/libsolidity/syntaxTests/inlineAssembly/invalid/storage_assignment_in_modifier.sol b/test/libsolidity/syntaxTests/inlineAssembly/invalid/storage_assignment_in_modifier.sol index b9b92d479..28736b38f 100644 --- a/test/libsolidity/syntaxTests/inlineAssembly/invalid/storage_assignment_in_modifier.sol +++ b/test/libsolidity/syntaxTests/inlineAssembly/invalid/storage_assignment_in_modifier.sol @@ -10,4 +10,4 @@ contract test { } } // ---- -// TypeError: (80-81): Only local variables are supported. To access storage variables, use the _slot and _offset suffixes. +// TypeError: (80-81): Only local variables are supported. To access storage variables, use the "_slot" and "_offset" suffixes. diff --git a/test/libsolidity/syntaxTests/inlineAssembly/invalid/unbalanced_negative_stack.sol b/test/libsolidity/syntaxTests/inlineAssembly/invalid/unbalanced_negative_stack.sol index 73f4ed76a..28e6f90ec 100644 --- a/test/libsolidity/syntaxTests/inlineAssembly/invalid/unbalanced_negative_stack.sol +++ b/test/libsolidity/syntaxTests/inlineAssembly/invalid/unbalanced_negative_stack.sol @@ -6,4 +6,4 @@ contract test { } } // ---- -// ParserError: (85-86): Expected '(' but got '}' +// ParserError: (85-86): Expected "(" but got "}" diff --git a/test/libsolidity/syntaxTests/inlineAssembly/invalid/unbalanced_two_stack_load.sol b/test/libsolidity/syntaxTests/inlineAssembly/invalid/unbalanced_two_stack_load.sol index ca1e15a92..ac87dd6f1 100644 --- a/test/libsolidity/syntaxTests/inlineAssembly/invalid/unbalanced_two_stack_load.sol +++ b/test/libsolidity/syntaxTests/inlineAssembly/invalid/unbalanced_two_stack_load.sol @@ -5,4 +5,4 @@ contract c { } } // ---- -// TypeError: (75-76): Only local variables are supported. To access storage variables, use the _slot and _offset suffixes. +// TypeError: (75-76): Only local variables are supported. To access storage variables, use the "_slot" and "_offset" suffixes. diff --git a/test/libsolidity/syntaxTests/inlineAssembly/invalid/variable_declaration_suffix_offset.sol b/test/libsolidity/syntaxTests/inlineAssembly/invalid/variable_declaration_suffix_offset.sol index e27fb041b..157d78a02 100644 --- a/test/libsolidity/syntaxTests/inlineAssembly/invalid/variable_declaration_suffix_offset.sol +++ b/test/libsolidity/syntaxTests/inlineAssembly/invalid/variable_declaration_suffix_offset.sol @@ -9,7 +9,7 @@ contract C { } } // ---- -// DeclarationError: (79-87): In variable declarations _slot and _offset can not be used as a suffix. -// DeclarationError: (109-115): In variable declarations _slot and _offset can not be used as a suffix. -// DeclarationError: (137-144): In variable declarations _slot and _offset can not be used as a suffix. -// DeclarationError: (166-171): In variable declarations _slot and _offset can not be used as a suffix. +// DeclarationError: (79-87): In variable declarations "_slot" and "_offset" can not be used as a suffix. +// DeclarationError: (109-115): In variable declarations "_slot" and "_offset" can not be used as a suffix. +// DeclarationError: (137-144): In variable declarations "_slot" and "_offset" can not be used as a suffix. +// DeclarationError: (166-171): In variable declarations "_slot" and "_offset" can not be used as a suffix. diff --git a/test/libsolidity/syntaxTests/inlineAssembly/storage_reference.sol b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference.sol index 089f379b9..dc739608d 100644 --- a/test/libsolidity/syntaxTests/inlineAssembly/storage_reference.sol +++ b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference.sol @@ -8,4 +8,4 @@ contract C { } } // ---- -// TypeError: (118-119): You have to use the _slot or _offset suffix to access storage reference variables. +// TypeError: (118-119): You have to use the "_slot" or "_offset" suffix to access storage reference variables. diff --git a/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_offset.sol b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_offset.sol index 8666889b8..255a4e09d 100644 --- a/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_offset.sol +++ b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_offset.sol @@ -6,4 +6,4 @@ contract C { } } // ---- -// DeclarationError: (84-91): In variable names _slot and _offset can only be used as a suffix. +// DeclarationError: (84-91): In variable names "_slot" and "_offset" can only be used as a suffix. diff --git a/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_slot.sol b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_slot.sol index 05935f19f..514ad46ff 100644 --- a/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_slot.sol +++ b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_empty_slot.sol @@ -6,4 +6,4 @@ contract C { } } // ---- -// DeclarationError: (84-89): In variable names _slot and _offset can only be used as a suffix. +// DeclarationError: (84-89): In variable names "_slot" and "_offset" can only be used as a suffix. diff --git a/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_on_function.sol b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_on_function.sol index 9165654fb..da8ed541b 100644 --- a/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_on_function.sol +++ b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_on_function.sol @@ -6,4 +6,4 @@ contract C { } } // ---- -// TypeError: (84-90): The suffixes _offset and _slot can only be used on storage variables. +// TypeError: (84-90): The suffixes "_offset" and "_slot" can only be used on storage variables. diff --git a/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_on_memory.sol b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_on_memory.sol index ab60f5f71..c1b2ab8d7 100644 --- a/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_on_memory.sol +++ b/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_on_memory.sol @@ -9,5 +9,5 @@ contract C { } } // ---- -// TypeError: (117-123): The suffixes _offset and _slot can only be used on storage variables. -// TypeError: (141-149): The suffixes _offset and _slot can only be used on storage variables. +// TypeError: (117-123): The suffixes "_offset" and "_slot" can only be used on storage variables. +// TypeError: (141-149): The suffixes "_offset" and "_slot" can only be used on storage variables. diff --git a/test/libsolidity/syntaxTests/inline_arrays/dynamic_inline_array.sol b/test/libsolidity/syntaxTests/inline_arrays/dynamic_inline_array.sol index e613758b5..aa0d2ae52 100644 --- a/test/libsolidity/syntaxTests/inline_arrays/dynamic_inline_array.sol +++ b/test/libsolidity/syntaxTests/inline_arrays/dynamic_inline_array.sol @@ -5,4 +5,4 @@ contract C { } // ---- // Warning: (47-69): Unused local variable. -// Warning: (17-135): Function state mutability can be restricted to pure +// Warning: (17-135): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_and_passing_implicit_conversion.sol b/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_and_passing_implicit_conversion.sol index 023404f72..882e9f7ee 100644 --- a/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_and_passing_implicit_conversion.sol +++ b/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_and_passing_implicit_conversion.sol @@ -8,4 +8,4 @@ } } // ---- -// Warning: (25-229): Function state mutability can be restricted to pure +// Warning: (25-229): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_and_passing_implicit_conversion_strings.sol b/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_and_passing_implicit_conversion_strings.sol index 025244d3c..bcbb433a0 100644 --- a/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_and_passing_implicit_conversion_strings.sol +++ b/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_and_passing_implicit_conversion_strings.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// Warning: (17-198): Function state mutability can be restricted to pure +// Warning: (17-198): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_const_int_conversion.sol b/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_const_int_conversion.sol index e7036bdf1..0598f8d80 100644 --- a/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_const_int_conversion.sol +++ b/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_const_int_conversion.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// Warning: (17-121): Function state mutability can be restricted to pure +// Warning: (17-121): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_const_string_conversion.sol b/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_const_string_conversion.sol index 4e92f6e11..750c67143 100644 --- a/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_const_string_conversion.sol +++ b/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_const_string_conversion.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// Warning: (17-140): Function state mutability can be restricted to pure +// Warning: (17-140): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_no_type.sol b/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_no_type.sol index 4d3e6aed8..d6c4fd9ed 100644 --- a/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_no_type.sol +++ b/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_no_type.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// Warning: (17-88): Function state mutability can be restricted to pure +// Warning: (17-88): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_no_type_strings.sol b/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_no_type_strings.sol index 6d36942da..f5e106a7b 100644 --- a/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_no_type_strings.sol +++ b/test/libsolidity/syntaxTests/inline_arrays/inline_array_declaration_no_type_strings.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// Warning: (17-112): Function state mutability can be restricted to pure +// Warning: (17-112): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/inline_arrays/inline_array_fixed_types.sol b/test/libsolidity/syntaxTests/inline_arrays/inline_array_fixed_types.sol index 7aef51a91..aeafbdedc 100644 --- a/test/libsolidity/syntaxTests/inline_arrays/inline_array_fixed_types.sol +++ b/test/libsolidity/syntaxTests/inline_arrays/inline_array_fixed_types.sol @@ -6,4 +6,4 @@ contract test { // ---- // UnimplementedFeatureError: Not yet implemented - FixedPointType. // Warning: (50-67): Unused local variable. -// Warning: (20-119): Function state mutability can be restricted to pure +// Warning: (20-119): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/inline_arrays/inline_array_of_mapping_type.sol b/test/libsolidity/syntaxTests/inline_arrays/inline_array_of_mapping_type.sol index 59a88130c..23b03ba95 100644 --- a/test/libsolidity/syntaxTests/inline_arrays/inline_array_of_mapping_type.sol +++ b/test/libsolidity/syntaxTests/inline_arrays/inline_array_of_mapping_type.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (66-69): Type mapping(int256 => int256) is only valid in storage. +// TypeError: (66-69): Type "mapping(int256 => int256)" is only valid in storage. diff --git a/test/libsolidity/syntaxTests/inline_arrays/inline_array_rationals.sol b/test/libsolidity/syntaxTests/inline_arrays/inline_array_rationals.sol index a46db5a60..17f98a7e6 100644 --- a/test/libsolidity/syntaxTests/inline_arrays/inline_array_rationals.sol +++ b/test/libsolidity/syntaxTests/inline_arrays/inline_array_rationals.sol @@ -6,4 +6,4 @@ contract test { // ---- // UnimplementedFeatureError: Not yet implemented - FixedPointType. // Warning: (50-73): Unused local variable. -// Warning: (20-118): Function state mutability can be restricted to pure +// Warning: (20-118): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/literalOperations/division_by_zero.sol b/test/libsolidity/syntaxTests/literalOperations/division_by_zero.sol index b52b4c512..80adb39ba 100644 --- a/test/libsolidity/syntaxTests/literalOperations/division_by_zero.sol +++ b/test/libsolidity/syntaxTests/literalOperations/division_by_zero.sol @@ -2,4 +2,4 @@ contract C { uint constant a = 1 / 0; } // ---- -// TypeError: (35-40): Operator / not compatible with types int_const 1 and int_const 0 +// TypeError: (35-40): Operator "/" not compatible with types "int_const 1" and "int_const 0". diff --git a/test/libsolidity/syntaxTests/literalOperations/division_by_zero_complex.sol b/test/libsolidity/syntaxTests/literalOperations/division_by_zero_complex.sol index 8cc3b6f2a..587ff5a5b 100644 --- a/test/libsolidity/syntaxTests/literalOperations/division_by_zero_complex.sol +++ b/test/libsolidity/syntaxTests/literalOperations/division_by_zero_complex.sol @@ -2,4 +2,4 @@ contract C { uint constant a = 1 / ((1+3)-4); } // ---- -// TypeError: (35-48): Operator / not compatible with types int_const 1 and int_const 0 +// TypeError: (35-48): Operator "/" not compatible with types "int_const 1" and "int_const 0". diff --git a/test/libsolidity/syntaxTests/literalOperations/mod_zero.sol b/test/libsolidity/syntaxTests/literalOperations/mod_zero.sol index 1bbbc3fc9..e80d461cb 100644 --- a/test/libsolidity/syntaxTests/literalOperations/mod_zero.sol +++ b/test/libsolidity/syntaxTests/literalOperations/mod_zero.sol @@ -2,4 +2,4 @@ contract C { uint constant b3 = 1 % 0; } // ---- -// TypeError: (36-41): Operator % not compatible with types int_const 1 and int_const 0 +// TypeError: (36-41): Operator "%" not compatible with types "int_const 1" and "int_const 0". diff --git a/test/libsolidity/syntaxTests/literalOperations/mod_zero_complex.sol b/test/libsolidity/syntaxTests/literalOperations/mod_zero_complex.sol index 4899cac37..7bc9718ca 100644 --- a/test/libsolidity/syntaxTests/literalOperations/mod_zero_complex.sol +++ b/test/libsolidity/syntaxTests/literalOperations/mod_zero_complex.sol @@ -2,4 +2,4 @@ contract C { uint constant b3 = 1 % (-4+((2)*2)); } // ---- -// TypeError: (36-52): Operator % not compatible with types int_const 1 and int_const 0 +// TypeError: (36-52): Operator "%" not compatible with types "int_const 1" and "int_const 0". diff --git a/test/libsolidity/syntaxTests/memberLookup/failed_function_lookup_in_library.sol b/test/libsolidity/syntaxTests/memberLookup/failed_function_lookup_in_library.sol index d8f2eadd1..0dc8a6492 100644 --- a/test/libsolidity/syntaxTests/memberLookup/failed_function_lookup_in_library.sol +++ b/test/libsolidity/syntaxTests/memberLookup/failed_function_lookup_in_library.sol @@ -6,4 +6,4 @@ contract C { function g() public { L.f(1, 2, 3); } } // ---- -// TypeError: (115-118): Member "f" not found or not visible after argument-dependent lookup in type(library L). +// TypeError: (115-118): Member "f" not found or not visible after argument-dependent lookup in "type(library L)". diff --git a/test/libsolidity/syntaxTests/memberLookup/member_not_unique.sol b/test/libsolidity/syntaxTests/memberLookup/member_not_unique.sol index 37ef32b01..5f0077d16 100644 --- a/test/libsolidity/syntaxTests/memberLookup/member_not_unique.sol +++ b/test/libsolidity/syntaxTests/memberLookup/member_not_unique.sol @@ -10,4 +10,4 @@ contract C { } } // ---- -// TypeError: (282-287): Member "a" not unique after argument-dependent lookup in contract C. +// TypeError: (282-287): Member "a" not unique after argument-dependent lookup in "contract C". diff --git a/test/libsolidity/syntaxTests/memberLookup/member_value_not_unique.sol b/test/libsolidity/syntaxTests/memberLookup/member_value_not_unique.sol index e1c69fe3e..b83039daf 100644 --- a/test/libsolidity/syntaxTests/memberLookup/member_value_not_unique.sol +++ b/test/libsolidity/syntaxTests/memberLookup/member_value_not_unique.sol @@ -10,4 +10,4 @@ contract C { } } // ---- -// TypeError: (290-299): Member "value" not unique after argument-dependent lookup in contract C - did you forget the "payable" modifier? +// TypeError: (290-299): Member "value" not unique after argument-dependent lookup in "contract C" - did you forget the "payable" modifier? diff --git a/test/libsolidity/syntaxTests/memberLookup/memory_structs_with_mapping_array_struct_array.sol b/test/libsolidity/syntaxTests/memberLookup/memory_structs_with_mapping_array_struct_array.sol index 64d62e08c..dc8227af2 100644 --- a/test/libsolidity/syntaxTests/memberLookup/memory_structs_with_mapping_array_struct_array.sol +++ b/test/libsolidity/syntaxTests/memberLookup/memory_structs_with_mapping_array_struct_array.sol @@ -9,4 +9,4 @@ contract Test { } } // ---- -// TypeError: (208-218): Member "b1" is not available in struct Test.S1 memory outside of storage. +// TypeError: (208-218): Member "b1" is not available in "struct Test.S1 memory" outside of storage. diff --git a/test/libsolidity/syntaxTests/memberLookup/memory_structs_with_mappings.sol b/test/libsolidity/syntaxTests/memberLookup/memory_structs_with_mappings.sol index bdafc754b..f8f1e03fa 100644 --- a/test/libsolidity/syntaxTests/memberLookup/memory_structs_with_mappings.sol +++ b/test/libsolidity/syntaxTests/memberLookup/memory_structs_with_mappings.sol @@ -7,4 +7,4 @@ contract Test { } } // ---- -// TypeError: (118-121): Member "b" is not available in struct Test.S memory outside of storage. +// TypeError: (118-121): Member "b" is not available in "struct Test.S memory" outside of storage. diff --git a/test/libsolidity/syntaxTests/memberLookup/msg_value_modifier_pure.sol b/test/libsolidity/syntaxTests/memberLookup/msg_value_modifier_pure.sol index 398c127db..e23959a35 100644 --- a/test/libsolidity/syntaxTests/memberLookup/msg_value_modifier_pure.sol +++ b/test/libsolidity/syntaxTests/memberLookup/msg_value_modifier_pure.sol @@ -3,4 +3,4 @@ contract C { function f() costs(1 ether) public pure {} } // ---- -// TypeError: (101-115): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (101-115): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". diff --git a/test/libsolidity/syntaxTests/memberLookup/msg_value_modifier_view.sol b/test/libsolidity/syntaxTests/memberLookup/msg_value_modifier_view.sol index abfc1eb87..ba768896a 100644 --- a/test/libsolidity/syntaxTests/memberLookup/msg_value_modifier_view.sol +++ b/test/libsolidity/syntaxTests/memberLookup/msg_value_modifier_view.sol @@ -3,4 +3,4 @@ contract C { function f() costs(1 ether) public view {} } // ---- -// TypeError: (101-115): This modifier uses "msg.value" or "callvalue()" and thus the function has to be payable or internal. +// TypeError: (101-115): This modifier uses "msg.value" or "callvalue()" and thus the function has to be "payable" or "internal". diff --git a/test/libsolidity/syntaxTests/memberLookup/push_on_memory_types.sol b/test/libsolidity/syntaxTests/memberLookup/push_on_memory_types.sol index 310c073f5..84b0ba2b4 100644 --- a/test/libsolidity/syntaxTests/memberLookup/push_on_memory_types.sol +++ b/test/libsolidity/syntaxTests/memberLookup/push_on_memory_types.sol @@ -5,4 +5,4 @@ contract Test { } } // ---- -// TypeError: (77-83): Member "push" is not available in uint256[] memory outside of storage. +// TypeError: (77-83): Member "push" is not available in "uint256[] memory" outside of storage. diff --git a/test/libsolidity/syntaxTests/metaTypes/codeAccessAbstractCreation.sol b/test/libsolidity/syntaxTests/metaTypes/codeAccessAbstractCreation.sol index b48a63abf..51b57ed24 100644 --- a/test/libsolidity/syntaxTests/metaTypes/codeAccessAbstractCreation.sol +++ b/test/libsolidity/syntaxTests/metaTypes/codeAccessAbstractCreation.sol @@ -7,4 +7,4 @@ abstract contract Other { function f(uint) public returns (uint); } // ---- -// TypeError: (97-121): Member "creationCode" not found or not visible after argument-dependent lookup in type(contract Other). +// TypeError: (97-121): Member "creationCode" not found or not visible after argument-dependent lookup in "type(contract Other)". diff --git a/test/libsolidity/syntaxTests/metaTypes/codeAccessAbstractRuntime.sol b/test/libsolidity/syntaxTests/metaTypes/codeAccessAbstractRuntime.sol index 4ff08b3fc..588cb3fc7 100644 --- a/test/libsolidity/syntaxTests/metaTypes/codeAccessAbstractRuntime.sol +++ b/test/libsolidity/syntaxTests/metaTypes/codeAccessAbstractRuntime.sol @@ -7,4 +7,4 @@ abstract contract Other { function f(uint) public returns (uint); } // ---- -// TypeError: (91-114): Member "runtimeCode" not found or not visible after argument-dependent lookup in type(contract Other). +// TypeError: (91-114): Member "runtimeCode" not found or not visible after argument-dependent lookup in "type(contract Other)". diff --git a/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierContractName.sol b/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierContractName.sol index 144ca1c38..16f567761 100644 --- a/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierContractName.sol +++ b/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierContractName.sol @@ -1,3 +1,3 @@ contract type { } // ---- -// ParserError: (9-13): Expected identifier but got 'type' +// ParserError: (9-13): Expected identifier but got "type" diff --git a/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierFunction.sol b/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierFunction.sol index b7881f153..8f8835a6f 100644 --- a/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierFunction.sol +++ b/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierFunction.sol @@ -3,4 +3,4 @@ contract Test { } } // ---- -// ParserError: (29-33): Expected identifier but got 'type' +// ParserError: (29-33): Expected identifier but got "type" diff --git a/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierParameter.sol b/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierParameter.sol index 001ba8405..8387ec142 100644 --- a/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierParameter.sol +++ b/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierParameter.sol @@ -3,4 +3,4 @@ contract Test { } } // ---- -// ParserError: (36-40): Expected ',' but got 'type' +// ParserError: (36-40): Expected "," but got "type" diff --git a/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierStateVariable.sol b/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierStateVariable.sol index fa827a33b..9407e3d4c 100644 --- a/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierStateVariable.sol +++ b/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierStateVariable.sol @@ -2,4 +2,4 @@ contract Test { uint type; } // ---- -// ParserError: (25-29): Expected identifier but got 'type' +// ParserError: (25-29): Expected identifier but got "type" diff --git a/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierVariable.sol b/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierVariable.sol index fa57698d4..782c298bd 100644 --- a/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierVariable.sol +++ b/test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierVariable.sol @@ -4,4 +4,4 @@ contract Test { } } // ---- -// ParserError: (60-64): Expected ';' but got 'type' +// ParserError: (60-64): Expected ";" but got "type" diff --git a/test/libsolidity/syntaxTests/metaTypes/typeRecursive.sol b/test/libsolidity/syntaxTests/metaTypes/typeRecursive.sol index 0ce06786e..149285597 100644 --- a/test/libsolidity/syntaxTests/metaTypes/typeRecursive.sol +++ b/test/libsolidity/syntaxTests/metaTypes/typeRecursive.sol @@ -4,5 +4,5 @@ contract Test { } } // ---- -// TypeError: (65-75): Invalid type for argument in function call. Contract type required, but type(contract Test) provided. -// TypeError: (60-76): Invalid type for argument in function call. Contract type required, but tuple() provided. +// TypeError: (65-75): Invalid type for argument in function call. Contract type required, but "type(contract Test)" provided. +// TypeError: (60-76): Invalid type for argument in function call. Contract type required, but "tuple()" provided. diff --git a/test/libsolidity/syntaxTests/metaTypes/unsupportedArgForType.sol b/test/libsolidity/syntaxTests/metaTypes/unsupportedArgForType.sol index 5c27d42f2..5b3d09d2b 100644 --- a/test/libsolidity/syntaxTests/metaTypes/unsupportedArgForType.sol +++ b/test/libsolidity/syntaxTests/metaTypes/unsupportedArgForType.sol @@ -6,4 +6,4 @@ contract Test { } } // ---- -// TypeError: (154-155): Invalid type for argument in function call. Contract type required, but type(struct Test.S) provided. +// TypeError: (154-155): Invalid type for argument in function call. Contract type required, but "type(struct Test.S)" provided. diff --git a/test/libsolidity/syntaxTests/missing_state_variable.sol b/test/libsolidity/syntaxTests/missing_state_variable.sol index 8b97220c5..52ee9f973 100644 --- a/test/libsolidity/syntaxTests/missing_state_variable.sol +++ b/test/libsolidity/syntaxTests/missing_state_variable.sol @@ -4,4 +4,4 @@ contract Scope { } } // ---- -// TypeError: (101-115): Member "stateVar" not found or not visible after argument-dependent lookup in type(contract Scope). +// TypeError: (101-115): Member "stateVar" not found or not visible after argument-dependent lookup in "type(contract Scope)". diff --git a/test/libsolidity/syntaxTests/modifiers/invalid_function_modifier_type.sol b/test/libsolidity/syntaxTests/modifiers/invalid_function_modifier_type.sol index c1e3108bd..f816a9142 100644 --- a/test/libsolidity/syntaxTests/modifiers/invalid_function_modifier_type.sol +++ b/test/libsolidity/syntaxTests/modifiers/invalid_function_modifier_type.sol @@ -3,4 +3,4 @@ contract B { modifier mod1(uint a) { if (a > 0) _; } } // ---- -// TypeError: (35-39): Invalid type for argument in modifier invocation. Invalid implicit conversion from bool to uint256 requested. +// TypeError: (35-39): Invalid type for argument in modifier invocation. Invalid implicit conversion from "bool" to "uint256" requested. diff --git a/test/libsolidity/syntaxTests/modifiers/modifier_without_underscore.sol b/test/libsolidity/syntaxTests/modifiers/modifier_without_underscore.sol index 6198d3c55..c7a2bb7ce 100644 --- a/test/libsolidity/syntaxTests/modifiers/modifier_without_underscore.sol +++ b/test/libsolidity/syntaxTests/modifiers/modifier_without_underscore.sol @@ -2,4 +2,4 @@ contract test { modifier m() {} } // ---- -// SyntaxError: (33-35): Modifier body does not contain '_'. +// SyntaxError: (33-35): Modifier body does not contain "_". diff --git a/test/libsolidity/syntaxTests/multiSource/import.sol b/test/libsolidity/syntaxTests/multiSource/import.sol index 4d9f6c686..17dbf54ae 100644 --- a/test/libsolidity/syntaxTests/multiSource/import.sol +++ b/test/libsolidity/syntaxTests/multiSource/import.sol @@ -8,5 +8,5 @@ contract B is A { function f(uint256 x) public view returns(uint256) { return x; } } // ---- -// Warning: (A:14-78): Function state mutability can be restricted to pure -// Warning: (B:31-95): Function state mutability can be restricted to pure +// Warning: (A:14-78): Function state mutability can be restricted to "pure". +// Warning: (B:31-95): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/multiSource/one_source.sol b/test/libsolidity/syntaxTests/multiSource/one_source.sol index 0f0d129b5..f2ed0ff15 100644 --- a/test/libsolidity/syntaxTests/multiSource/one_source.sol +++ b/test/libsolidity/syntaxTests/multiSource/one_source.sol @@ -4,4 +4,4 @@ contract A { function f() public pure { x = 42; } } // ---- -// TypeError: (SourceName:53-54): Function declared as pure, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. +// TypeError: (SourceName:53-54): Function declared as "pure", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". diff --git a/test/libsolidity/syntaxTests/multiSource/warning_in_both.sol b/test/libsolidity/syntaxTests/multiSource/warning_in_both.sol index 1522e42aa..b96161c84 100644 --- a/test/libsolidity/syntaxTests/multiSource/warning_in_both.sol +++ b/test/libsolidity/syntaxTests/multiSource/warning_in_both.sol @@ -7,5 +7,5 @@ contract B { function f(uint256 x) public view returns(uint256) { return x; } } // ---- -// Warning: (A:14-78): Function state mutability can be restricted to pure -// Warning: (B:14-78): Function state mutability can be restricted to pure +// Warning: (A:14-78): Function state mutability can be restricted to "pure". +// Warning: (B:14-78): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationInvalidType.sol b/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationInvalidType.sol index 85094d001..233f16ad9 100644 --- a/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationInvalidType.sol +++ b/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationInvalidType.sol @@ -5,5 +5,5 @@ contract C { } } // ---- -// TypeError: (85-118): Type string memory is not implicitly convertible to expected type uint256. -// TypeError: (85-118): Type uint256 is not implicitly convertible to expected type string memory. +// TypeError: (85-118): Type "string memory" is not implicitly convertible to expected type "uint256". +// TypeError: (85-118): Type "uint256" is not implicitly convertible to expected type "string memory". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/010_type_conversion_for_comparison.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/010_type_conversion_for_comparison.sol index c0cd87d46..ffa66e1c1 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/010_type_conversion_for_comparison.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/010_type_conversion_for_comparison.sol @@ -3,4 +3,4 @@ contract test { } // ---- // Warning: (42-63): Statement has no effect. -// Warning: (20-66): Function state mutability can be restricted to pure +// Warning: (20-66): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/011_type_conversion_for_comparison_invalid.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/011_type_conversion_for_comparison_invalid.sol index 9cbce0d06..91f95616c 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/011_type_conversion_for_comparison_invalid.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/011_type_conversion_for_comparison_invalid.sol @@ -2,4 +2,4 @@ contract test { function f() public { int32(2) == uint64(2); } } // ---- -// TypeError: (42-63): Operator == not compatible with types int32 and uint64 +// TypeError: (42-63): Operator "==" not compatible with types "int32" and "uint64". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/013_large_string_literal.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/013_large_string_literal.sol index 7f858a4d7..becce7b19 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/013_large_string_literal.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/013_large_string_literal.sol @@ -3,4 +3,4 @@ contract test { } // ---- // Warning: (42-57): Unused local variable. -// Warning: (20-98): Function state mutability can be restricted to pure +// Warning: (20-98): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/014_balance.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/014_balance.sol index e2c9a8bff..0aa9220ba 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/014_balance.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/014_balance.sol @@ -5,4 +5,4 @@ contract test { } // ---- // Warning: (52-61): Unused local variable. -// Warning: (20-89): Function state mutability can be restricted to view +// Warning: (20-89): Function state mutability can be restricted to "view". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/019_comparison_bitop_precedence.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/019_comparison_bitop_precedence.sol index eab272dfa..fc510770b 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/019_comparison_bitop_precedence.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/019_comparison_bitop_precedence.sol @@ -4,4 +4,4 @@ contract First { } } // ---- -// Warning: (21-117): Function state mutability can be restricted to pure +// Warning: (21-117): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/020_comparison_of_function_types_lt_1.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/020_comparison_of_function_types_lt_1.sol index 1f288ff72..3a9bf819f 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/020_comparison_of_function_types_lt_1.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/020_comparison_of_function_types_lt_1.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (73-88): Operator < not compatible with types function () external returns (bool) and function () external returns (bool) +// TypeError: (73-88): Operator "<" not compatible with types "function () external returns (bool)" and "function () external returns (bool)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/021_comparison_of_function_types_lt_2.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/021_comparison_of_function_types_lt_2.sol index a6422d38e..d3e4db3f9 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/021_comparison_of_function_types_lt_2.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/021_comparison_of_function_types_lt_2.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (73-78): Operator < not compatible with types function () returns (bool) and function () returns (bool) +// TypeError: (73-78): Operator "<" not compatible with types "function () returns (bool)" and "function () returns (bool)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/022_comparison_of_function_types_gt_1.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/022_comparison_of_function_types_gt_1.sol index ee8659124..a22fad7ba 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/022_comparison_of_function_types_gt_1.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/022_comparison_of_function_types_gt_1.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (73-88): Operator > not compatible with types function () external returns (bool) and function () external returns (bool) +// TypeError: (73-88): Operator ">" not compatible with types "function () external returns (bool)" and "function () external returns (bool)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/023_comparison_of_function_types_gt_2.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/023_comparison_of_function_types_gt_2.sol index 590cc98bb..20b877953 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/023_comparison_of_function_types_gt_2.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/023_comparison_of_function_types_gt_2.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (73-78): Operator > not compatible with types function () returns (bool) and function () returns (bool) +// TypeError: (73-78): Operator ">" not compatible with types "function () returns (bool)" and "function () returns (bool)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/024_comparison_of_function_types_eq.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/024_comparison_of_function_types_eq.sol index 71dbec6b3..ae9a9cbf9 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/024_comparison_of_function_types_eq.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/024_comparison_of_function_types_eq.sol @@ -7,5 +7,5 @@ contract C { } } // ---- -// Warning: (17-86): Function state mutability can be restricted to pure -// Warning: (91-160): Function state mutability can be restricted to pure +// Warning: (17-86): Function state mutability can be restricted to "pure". +// Warning: (91-160): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/025_comparison_of_mapping_types.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/025_comparison_of_mapping_types.sol index b15666c0b..ec4b0f5bd 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/025_comparison_of_mapping_types.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/025_comparison_of_mapping_types.sol @@ -6,4 +6,4 @@ contract C { } } // ---- -// TypeError: (147-153): Operator == not compatible with types mapping(uint256 => uint256) and mapping(uint256 => uint256) +// TypeError: (147-153): Operator "==" not compatible with types "mapping(uint256 => uint256)" and "mapping(uint256 => uint256)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/050_function_external_call_not_allowed_conversion.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/050_function_external_call_not_allowed_conversion.sol index 18d75948c..0f5a92e79 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/050_function_external_call_not_allowed_conversion.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/050_function_external_call_not_allowed_conversion.sol @@ -7,4 +7,4 @@ contract Test { function g (C c) external {} } // ---- -// TypeError: (103-106): Invalid type for argument in function call. Invalid implicit conversion from address to contract C requested. +// TypeError: (103-106): Invalid type for argument in function call. Invalid implicit conversion from "address" to "contract C" requested. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/052_function_internal_not_allowed_conversion.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/052_function_internal_not_allowed_conversion.sol index c16d35eb3..7b2473f77 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/052_function_internal_not_allowed_conversion.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/052_function_internal_not_allowed_conversion.sol @@ -9,4 +9,4 @@ contract Test { } } // ---- -// TypeError: (136-137): Invalid type for argument in function call. Invalid implicit conversion from address to contract C requested. +// TypeError: (136-137): Invalid type for argument in function call. Invalid implicit conversion from "address" to "contract C" requested. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/053_hash_collision_in_interface.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/053_hash_collision_in_interface.sol index fe690e169..1fc5a8828 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/053_hash_collision_in_interface.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/053_hash_collision_in_interface.sol @@ -3,4 +3,4 @@ contract test { function tgeo() public { } } // ---- -// TypeError: (0-78): Function signature hash collision for tgeo() +// TypeError: (0-78): Function signature hash collision for "tgeo()". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/063_implicit_derived_to_base_conversion.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/063_implicit_derived_to_base_conversion.sol index f4667996f..3e7d96d7f 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/063_implicit_derived_to_base_conversion.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/063_implicit_derived_to_base_conversion.sol @@ -4,4 +4,4 @@ contract B is A { } // ---- // Warning: (59-62): Unused local variable. -// Warning: (37-72): Function state mutability can be restricted to pure +// Warning: (37-72): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/064_implicit_base_to_derived_conversion.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/064_implicit_base_to_derived_conversion.sol index 0d23ea87d..59d016aa5 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/064_implicit_base_to_derived_conversion.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/064_implicit_base_to_derived_conversion.sol @@ -3,4 +3,4 @@ contract B is A { function f() public { B b = A(1); } } // ---- -// TypeError: (59-69): Type contract A is not implicitly convertible to expected type contract B. +// TypeError: (59-69): Type "contract A" is not implicitly convertible to expected type "contract B". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/065_super_excludes_current_contract.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/065_super_excludes_current_contract.sol index 544df1a56..c457da43a 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/065_super_excludes_current_contract.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/065_super_excludes_current_contract.sol @@ -8,4 +8,4 @@ contract B is A { } } // ---- -// TypeError: (95-102): Member "f" not found or not visible after argument-dependent lookup in contract super B. +// TypeError: (95-102): Member "f" not found or not visible after argument-dependent lookup in "contract super B". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/069_base_class_state_variable_accessor.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/069_base_class_state_variable_accessor.sol index d36d0bf8b..b4854a79f 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/069_base_class_state_variable_accessor.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/069_base_class_state_variable_accessor.sol @@ -6,4 +6,4 @@ contract Child is Parent { function foo() public returns (uint256) { return Parent.m_aMember; } } // ---- -// Warning: (158-226): Function state mutability can be restricted to view +// Warning: (158-226): Function state mutability can be restricted to "view". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/071_base_class_state_variable_internal_member.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/071_base_class_state_variable_internal_member.sol index 01fda2431..2660a60c2 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/071_base_class_state_variable_internal_member.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/071_base_class_state_variable_internal_member.sol @@ -5,4 +5,4 @@ contract Child is Parent { function foo() public returns (uint256) { return Parent.m_aMember; } } // ---- -// Warning: (83-151): Function state mutability can be restricted to view +// Warning: (83-151): Function state mutability can be restricted to "view". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/072_state_variable_member_of_wrong_class1.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/072_state_variable_member_of_wrong_class1.sol index dd73ac47b..596d361b3 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/072_state_variable_member_of_wrong_class1.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/072_state_variable_member_of_wrong_class1.sol @@ -8,4 +8,4 @@ contract Child is Parent2 { function foo() public returns (uint256) { return Parent2.m_aMember1; } } // ---- -// TypeError: (200-218): Member "m_aMember1" not found or not visible after argument-dependent lookup in type(contract Parent2). +// TypeError: (200-218): Member "m_aMember1" not found or not visible after argument-dependent lookup in "type(contract Parent2)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/073_state_variable_member_of_wrong_class2.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/073_state_variable_member_of_wrong_class2.sol index f2de6e72e..4d343a04d 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/073_state_variable_member_of_wrong_class2.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/073_state_variable_member_of_wrong_class2.sol @@ -9,4 +9,4 @@ contract Child is Parent2 { uint256 public m_aMember3; } // ---- -// TypeError: (200-216): Member "m_aMember2" not found or not visible after argument-dependent lookup in type(contract Child). +// TypeError: (200-216): Member "m_aMember2" not found or not visible after argument-dependent lookup in "type(contract Child)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/097_access_to_internal_function.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/097_access_to_internal_function.sol index 60d7b758e..1f6e50ec8 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/097_access_to_internal_function.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/097_access_to_internal_function.sol @@ -5,4 +5,4 @@ contract d { function g() public { c(0).f(); } } // ---- -// TypeError: (83-89): Member "f" not found or not visible after argument-dependent lookup in contract c. +// TypeError: (83-89): Member "f" not found or not visible after argument-dependent lookup in "contract c". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/098_access_to_default_state_variable_visibility.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/098_access_to_default_state_variable_visibility.sol index 8c9d0c0f8..ff3a50a72 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/098_access_to_default_state_variable_visibility.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/098_access_to_default_state_variable_visibility.sol @@ -5,4 +5,4 @@ contract d { function g() public { c(0).a(); } } // ---- -// TypeError: (66-72): Member "a" not found or not visible after argument-dependent lookup in contract c. +// TypeError: (66-72): Member "a" not found or not visible after argument-dependent lookup in "contract c". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/099_access_to_internal_state_variable.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/099_access_to_internal_state_variable.sol index 60aba5741..50248fd8d 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/099_access_to_internal_state_variable.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/099_access_to_internal_state_variable.sol @@ -5,4 +5,4 @@ contract d { function g() public { c(0).a(); } } // ---- -// Warning: (51-84): Function state mutability can be restricted to view +// Warning: (51-84): Function state mutability can be restricted to "view". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/107_empty_name_input_parameter_with_named_one.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/107_empty_name_input_parameter_with_named_one.sol index e0efa0a08..25818e430 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/107_empty_name_input_parameter_with_named_one.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/107_empty_name_input_parameter_with_named_one.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// Warning: (20-98): Function state mutability can be restricted to pure +// Warning: (20-98): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/111_overflow_caused_by_ether_units.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/111_overflow_caused_by_ether_units.sol index dc4cab8af..f2046a627 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/111_overflow_caused_by_ether_units.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/111_overflow_caused_by_ether_units.sol @@ -5,4 +5,4 @@ contract c { uint256 a; } // ---- -// TypeError: (52-118): Type int_const 1157...(70 digits omitted)...0000 is not implicitly convertible to expected type uint256. +// TypeError: (52-118): Type "int_const 1157...(70 digits omitted)...0000" is not implicitly convertible to expected type "uint256". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/112_exp_operator_exponent_too_big.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/112_exp_operator_exponent_too_big.sol index 2a9e6204b..3dc91304a 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/112_exp_operator_exponent_too_big.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/112_exp_operator_exponent_too_big.sol @@ -2,4 +2,4 @@ contract test { function f() public returns (uint d) { return 2 ** 10000000000; } } // ---- -// TypeError: (66-82): Operator ** not compatible with types int_const 2 and int_const 10000000000 +// TypeError: (66-82): Operator "**" not compatible with types "int_const 2" and "int_const 10000000000". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/113_exp_warn_literal_base_1.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/113_exp_warn_literal_base_1.sol index 0d91fcab1..b5edb5508 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/113_exp_warn_literal_base_1.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/113_exp_warn_literal_base_1.sol @@ -5,4 +5,4 @@ contract test { } } // ---- -// Warning: (99-104): Result of exponentiation has type uint8 and thus might overflow. Silence this warning by converting the literal to the expected type. +// Warning: (99-104): Result of exponentiation has type "uint8" and thus might overflow. Silence this warning by converting the literal to the expected type. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/116_shift_warn_literal_base_1.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/116_shift_warn_literal_base_1.sol index c6a4052ec..453b1adad 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/116_shift_warn_literal_base_1.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/116_shift_warn_literal_base_1.sol @@ -5,4 +5,4 @@ contract test { } } // ---- -// Warning: (99-106): Result of shift has type uint8 and thus might overflow. Silence this warning by converting the literal to the expected type. +// Warning: (99-106): Result of shift has type "uint8" and thus might overflow. Silence this warning by converting the literal to the expected type. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/125_enum_member_access_accross_contracts.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/125_enum_member_access_accross_contracts.sol index 3bed62d67..f6ee3362c 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/125_enum_member_access_accross_contracts.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/125_enum_member_access_accross_contracts.sol @@ -7,4 +7,4 @@ contract Impl { } } // ---- -// Warning: (72-166): Function state mutability can be restricted to pure +// Warning: (72-166): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/126_enum_invalid_member_access.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/126_enum_invalid_member_access.sol index e58ed1600..13b82d1ba 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/126_enum_invalid_member_access.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/126_enum_invalid_member_access.sol @@ -6,4 +6,4 @@ contract test { ActionChoices choices; } // ---- -// TypeError: (121-159): Member "RunAroundWavingYourHands" not found or not visible after argument-dependent lookup in type(enum test.ActionChoices). +// TypeError: (121-159): Member "RunAroundWavingYourHands" not found or not visible after argument-dependent lookup in "type(enum test.ActionChoices)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/130_enum_implicit_conversion_is_not_okay_256.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/130_enum_implicit_conversion_is_not_okay_256.sol index 01c5e93fc..863c10bcd 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/130_enum_implicit_conversion_is_not_okay_256.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/130_enum_implicit_conversion_is_not_okay_256.sol @@ -6,4 +6,4 @@ contract test { uint256 a; } // ---- -// TypeError: (115-139): Type enum test.ActionChoices is not implicitly convertible to expected type uint256. +// TypeError: (115-139): Type "enum test.ActionChoices" is not implicitly convertible to expected type "uint256". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/131_enum_implicit_conversion_is_not_okay_64.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/131_enum_implicit_conversion_is_not_okay_64.sol index 4e21b9aad..2053f2d60 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/131_enum_implicit_conversion_is_not_okay_64.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/131_enum_implicit_conversion_is_not_okay_64.sol @@ -6,4 +6,4 @@ contract test { uint64 b; } // ---- -// TypeError: (115-132): Type enum test.ActionChoices is not implicitly convertible to expected type uint64. +// TypeError: (115-132): Type "enum test.ActionChoices" is not implicitly convertible to expected type "uint64". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/134_enum_name_resolution_under_current_contract_name.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/134_enum_name_resolution_under_current_contract_name.sol index 4a16eee11..e9168de25 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/134_enum_name_resolution_under_current_contract_name.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/134_enum_name_resolution_under_current_contract_name.sol @@ -9,4 +9,4 @@ contract A { } } // ---- -// Warning: (69-111): Function state mutability can be restricted to pure +// Warning: (69-111): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/136_private_visibility_via_explicit_base_access.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/136_private_visibility_via_explicit_base_access.sol index 2f94ef92b..dfc5b56ad 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/136_private_visibility_via_explicit_base_access.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/136_private_visibility_via_explicit_base_access.sol @@ -5,4 +5,4 @@ contract derived is base { function g() public { base.f(); } } // ---- -// TypeError: (99-105): Member "f" not found or not visible after argument-dependent lookup in type(contract base). +// TypeError: (99-105): Member "f" not found or not visible after argument-dependent lookup in "type(contract base)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/145_external_base_visibility.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/145_external_base_visibility.sol index cf6804626..123ba946f 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/145_external_base_visibility.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/145_external_base_visibility.sol @@ -5,4 +5,4 @@ contract derived is base { function g() public { base.f(); } } // ---- -// TypeError: (100-106): Member "f" not found or not visible after argument-dependent lookup in type(contract base). +// TypeError: (100-106): Member "f" not found or not visible after argument-dependent lookup in "type(contract base)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/148_external_argument_delete.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/148_external_argument_delete.sol index 3955023ea..0f7182755 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/148_external_argument_delete.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/148_external_argument_delete.sol @@ -2,4 +2,4 @@ contract c { function f(uint a) external { delete a; } } // ---- -// Warning: (17-58): Function state mutability can be restricted to pure +// Warning: (17-58): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/149_test_for_bug_override_function_with_bytearray_type.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/149_test_for_bug_override_function_with_bytearray_type.sol index 1c1513e89..aa6583a25 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/149_test_for_bug_override_function_with_bytearray_type.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/149_test_for_bug_override_function_with_bytearray_type.sol @@ -5,4 +5,4 @@ contract Bike is Vehicle { function f(bytes calldata) override external returns (uint256 r) {r = 42;} } // ---- -// Warning: (23-95): Function state mutability can be restricted to pure +// Warning: (23-95): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/152_array_copy_with_different_types1.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/152_array_copy_with_different_types1.sol index a0e71847f..f3067292f 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/152_array_copy_with_different_types1.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/152_array_copy_with_different_types1.sol @@ -4,4 +4,4 @@ contract c { function f() public { b = a; } } // ---- -// TypeError: (70-71): Type bytes storage ref is not implicitly convertible to expected type uint256[] storage ref. +// TypeError: (70-71): Type "bytes storage ref" is not implicitly convertible to expected type "uint256[] storage ref". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/153_array_copy_with_different_types2.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/153_array_copy_with_different_types2.sol index 8d1cb1ef4..1a1650209 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/153_array_copy_with_different_types2.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/153_array_copy_with_different_types2.sol @@ -4,4 +4,4 @@ contract c { function f() public { b = a; } } // ---- -// TypeError: (74-75): Type uint32[] storage ref is not implicitly convertible to expected type uint8[] storage ref. +// TypeError: (74-75): Type "uint32[] storage ref" is not implicitly convertible to expected type "uint8[] storage ref". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/156_array_copy_with_different_types_dynamic_static.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/156_array_copy_with_different_types_dynamic_static.sol index 90aa53a0d..377b93c42 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/156_array_copy_with_different_types_dynamic_static.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/156_array_copy_with_different_types_dynamic_static.sol @@ -4,4 +4,4 @@ contract c { function f() public { b = a; } } // ---- -// TypeError: (73-74): Type uint256[] storage ref is not implicitly convertible to expected type uint256[80] storage ref. +// TypeError: (73-74): Type "uint256[] storage ref" is not implicitly convertible to expected type "uint256[80] storage ref". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/158_storage_variable_initialization_with_incorrect_type_int.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/158_storage_variable_initialization_with_incorrect_type_int.sol index b1ef153e8..a277363dd 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/158_storage_variable_initialization_with_incorrect_type_int.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/158_storage_variable_initialization_with_incorrect_type_int.sol @@ -2,4 +2,4 @@ contract c { uint8 a = 1000; } // ---- -// TypeError: (27-31): Type int_const 1000 is not implicitly convertible to expected type uint8. +// TypeError: (27-31): Type "int_const 1000" is not implicitly convertible to expected type "uint8". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/159_storage_variable_initialization_with_incorrect_type_string.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/159_storage_variable_initialization_with_incorrect_type_string.sol index 75736d988..0b3c3dbe2 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/159_storage_variable_initialization_with_incorrect_type_string.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/159_storage_variable_initialization_with_incorrect_type_string.sol @@ -2,4 +2,4 @@ contract c { uint a = "abc"; } // ---- -// TypeError: (26-31): Type literal_string "abc" is not implicitly convertible to expected type uint256. +// TypeError: (26-31): Type "literal_string "abc"" is not implicitly convertible to expected type "uint256". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/160_test_byte_is_alias_of_byte1.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/160_test_byte_is_alias_of_byte1.sol index 9977c839c..fd05ef54d 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/160_test_byte_is_alias_of_byte1.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/160_test_byte_is_alias_of_byte1.sol @@ -4,4 +4,4 @@ contract c { } // ---- // Warning: (54-60): Unused local variable. -// Warning: (32-71): Function state mutability can be restricted to view +// Warning: (32-71): Function state mutability can be restricted to "view". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/178_assignment_of_nonoverloaded_function.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/178_assignment_of_nonoverloaded_function.sol index 07fc1c439..ceca0013a 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/178_assignment_of_nonoverloaded_function.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/178_assignment_of_nonoverloaded_function.sol @@ -3,4 +3,4 @@ contract test { function g() public returns (uint) { function (uint) returns (uint) x = f; return x(7); } } // ---- -// Warning: (20-78): Function state mutability can be restricted to pure +// Warning: (20-78): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/185_invalid_utf8_implicit.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/185_invalid_utf8_implicit.sol index 5440b4255..92192e95d 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/185_invalid_utf8_implicit.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/185_invalid_utf8_implicit.sol @@ -2,4 +2,4 @@ contract C { string s = "\xa0\x00"; } // ---- -// TypeError: (28-38): Type literal_string (contains invalid UTF-8 sequence at position 0) is not implicitly convertible to expected type string storage ref. +// TypeError: (28-38): Type "literal_string (contains invalid UTF-8 sequence at position 0)" is not implicitly convertible to expected type "string storage ref". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/189_string_length.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/189_string_length.sol index 845b91566..d0634e231 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/189_string_length.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/189_string_length.sol @@ -3,4 +3,4 @@ contract C { function f() public { uint a = s.length; } } // ---- -// TypeError: (62-70): Member "length" not found or not visible after argument-dependent lookup in string storage ref. +// TypeError: (62-70): Member "length" not found or not visible after argument-dependent lookup in "string storage ref". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/190_negative_integers_to_signed_out_of_bound.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/190_negative_integers_to_signed_out_of_bound.sol index 2e8503af4..f335e1cd5 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/190_negative_integers_to_signed_out_of_bound.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/190_negative_integers_to_signed_out_of_bound.sol @@ -2,4 +2,4 @@ contract test { int8 public i = -129; } // ---- -// TypeError: (36-40): Type int_const -129 is not implicitly convertible to expected type int8. +// TypeError: (36-40): Type "int_const -129" is not implicitly convertible to expected type "int8". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/192_positive_integers_to_signed_out_of_bound.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/192_positive_integers_to_signed_out_of_bound.sol index d56045c2f..4ee2a6bca 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/192_positive_integers_to_signed_out_of_bound.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/192_positive_integers_to_signed_out_of_bound.sol @@ -2,4 +2,4 @@ contract test { int8 public j = 128; } // ---- -// TypeError: (36-39): Type int_const 128 is not implicitly convertible to expected type int8. +// TypeError: (36-39): Type "int_const 128" is not implicitly convertible to expected type "int8". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/194_negative_integers_to_unsigned.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/194_negative_integers_to_unsigned.sol index 3702f09ba..7980a2b4d 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/194_negative_integers_to_unsigned.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/194_negative_integers_to_unsigned.sol @@ -2,4 +2,4 @@ contract test { uint8 public x = -1; } // ---- -// TypeError: (37-39): Type int_const -1 is not implicitly convertible to expected type uint8. +// TypeError: (37-39): Type "int_const -1" is not implicitly convertible to expected type "uint8". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/195_positive_integers_to_unsigned_out_of_bound.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/195_positive_integers_to_unsigned_out_of_bound.sol index 812162296..63998d576 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/195_positive_integers_to_unsigned_out_of_bound.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/195_positive_integers_to_unsigned_out_of_bound.sol @@ -2,4 +2,4 @@ contract test { uint8 public x = 700; } // ---- -// TypeError: (37-40): Type int_const 700 is not implicitly convertible to expected type uint8. +// TypeError: (37-40): Type "int_const 700" is not implicitly convertible to expected type "uint8". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/196_integer_boolean_or.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/196_integer_boolean_or.sol index 2a51e9a6d..2f485567f 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/196_integer_boolean_or.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/196_integer_boolean_or.sol @@ -1,3 +1,3 @@ contract test { fallback() external { uint x = 1; uint y = 2; x || y; } } // ---- -// TypeError: (62-68): Operator || not compatible with types uint256 and uint256 +// TypeError: (62-68): Operator "||" not compatible with types "uint256" and "uint256". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/197_integer_boolean_and.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/197_integer_boolean_and.sol index 6ea90e77f..c9ea1ac66 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/197_integer_boolean_and.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/197_integer_boolean_and.sol @@ -1,3 +1,3 @@ contract test { fallback() external { uint x = 1; uint y = 2; x && y; } } // ---- -// TypeError: (62-68): Operator && not compatible with types uint256 and uint256 +// TypeError: (62-68): Operator "&&" not compatible with types "uint256" and "uint256". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/198_integer_boolean_not.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/198_integer_boolean_not.sol index ab5f5576c..f3e77323b 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/198_integer_boolean_not.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/198_integer_boolean_not.sol @@ -1,3 +1,3 @@ contract test { fallback() external { uint x = 1; !x; } } // ---- -// TypeError: (50-52): Unary operator ! cannot be applied to type uint256 +// TypeError: (50-52): Unary operator "!" cannot be applied to type "uint256". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/199_integer_unsigned_exp_signed.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/199_integer_unsigned_exp_signed.sol index ebdc122c6..d183a1abf 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/199_integer_unsigned_exp_signed.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/199_integer_unsigned_exp_signed.sol @@ -1,3 +1,3 @@ contract test { fallback() external { uint x = 3; int y = -4; x ** y; } } // ---- -// TypeError: (62-68): Operator ** not compatible with types uint256 and int256. Exponentiation power is not allowed to be a signed integer type. +// TypeError: (62-68): Operator "**" not compatible with types "uint256" and "int256". Exponentiation power is not allowed to be a signed integer type. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/201_integer_signed_exp_signed.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/201_integer_signed_exp_signed.sol index 73580e599..809cccde4 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/201_integer_signed_exp_signed.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/201_integer_signed_exp_signed.sol @@ -3,6 +3,6 @@ contract test { function h() public { uint8 x = 3; int16 y = 4; x ** y; } } // ---- -// TypeError: (64-70): Operator ** not compatible with types int256 and int256. Exponentiation power is not allowed to be a signed integer type. -// TypeError: (126-132): Operator ** not compatible with types uint8 and int16. Exponentiation power is not allowed to be a signed integer type. -// Warning: (126-132): The result type of the exponentiation operation is equal to the type of the first operand (uint8) ignoring the (larger) type of the second operand (int16) which might be unexpected. Silence this warning by either converting the first or the second operand to the type of the other. +// TypeError: (64-70): Operator "**" not compatible with types "int256" and "int256". Exponentiation power is not allowed to be a signed integer type. +// TypeError: (126-132): Operator "**" not compatible with types "uint8" and "int16". Exponentiation power is not allowed to be a signed integer type. +// Warning: (126-132): The result type of the exponentiationoperation is equal to the type of the first operand ("uint8") ignoring the (larger) type of the second operand ("int16") which might be unexpected. Silence this warning by either converting the first or the second operand to the type of the other. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/202_bytes_reference_compare_operators.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/202_bytes_reference_compare_operators.sol index 3864b2d1b..d00371bfe 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/202_bytes_reference_compare_operators.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/202_bytes_reference_compare_operators.sol @@ -1,3 +1,3 @@ contract test { bytes a; bytes b; fallback() external { a == b; } } // ---- -// TypeError: (56-62): Operator == not compatible with types bytes storage ref and bytes storage ref +// TypeError: (56-62): Operator "==" not compatible with types "bytes storage ref" and "bytes storage ref". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/203_struct_reference_compare_operators.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/203_struct_reference_compare_operators.sol index f867d6f3c..72d718440 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/203_struct_reference_compare_operators.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/203_struct_reference_compare_operators.sol @@ -7,4 +7,4 @@ contract test { } } // ---- -// TypeError: (79-85): Operator == not compatible with types struct test.s storage ref and struct test.s storage ref +// TypeError: (79-85): Operator "==" not compatible with types "struct test.s storage ref" and "struct test.s storage ref". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/207_no_mappings_in_memory_array.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/207_no_mappings_in_memory_array.sol index 5220ee22b..ac7e8da19 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/207_no_mappings_in_memory_array.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/207_no_mappings_in_memory_array.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (47-77): Type mapping(uint256 => uint256)[] memory is only valid in storage. +// TypeError: (47-77): Type "mapping(uint256 => uint256)[] memory" is only valid in storage. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/208_assignment_mem_to_local_storage_variable.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/208_assignment_mem_to_local_storage_variable.sol index cf3037720..396edd25a 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/208_assignment_mem_to_local_storage_variable.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/208_assignment_mem_to_local_storage_variable.sol @@ -6,4 +6,4 @@ contract C { } } // ---- -// TypeError: (128-129): Type uint256[] memory is not implicitly convertible to expected type uint256[] storage pointer. +// TypeError: (128-129): Type "uint256[] memory" is not implicitly convertible to expected type "uint256[] storage pointer". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/209_storage_assign_to_different_local_variable.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/209_storage_assign_to_different_local_variable.sol index aabdcd880..a353af641 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/209_storage_assign_to_different_local_variable.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/209_storage_assign_to_different_local_variable.sol @@ -9,4 +9,4 @@ contract C { } } // ---- -// TypeError: (163-164): Type uint8[] storage pointer is not implicitly convertible to expected type uint256[] storage pointer. +// TypeError: (163-164): Type "uint8[] storage pointer" is not implicitly convertible to expected type "uint256[] storage pointer". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/213_no_delete_on_storage_pointers.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/213_no_delete_on_storage_pointers.sol index 7a6fb1c7c..ba277d704 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/213_no_delete_on_storage_pointers.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/213_no_delete_on_storage_pointers.sol @@ -6,4 +6,4 @@ contract C { } } // ---- -// TypeError: (97-105): Unary operator delete cannot be applied to type uint256[] storage pointer +// TypeError: (97-105): Unary operator "delete" cannot be applied to type "uint256[] storage pointer". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/215_function_argument_mem_to_storage.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/215_function_argument_mem_to_storage.sol index 984b81b14..3a91407df 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/215_function_argument_mem_to_storage.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/215_function_argument_mem_to_storage.sol @@ -6,4 +6,4 @@ contract C { } } // ---- -// TypeError: (113-114): Invalid type for argument in function call. Invalid implicit conversion from uint256[] memory to uint256[] storage pointer requested. +// TypeError: (113-114): Invalid type for argument in function call. Invalid implicit conversion from "uint256[] memory" to "uint256[] storage pointer" requested. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/217_mem_array_assignment_changes_base_type.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/217_mem_array_assignment_changes_base_type.sol index 3755b9352..26be78907 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/217_mem_array_assignment_changes_base_type.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/217_mem_array_assignment_changes_base_type.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// TypeError: (256-275): Type uint8[] memory is not implicitly convertible to expected type uint256[] memory. +// TypeError: (256-275): Type "uint8[] memory" is not implicitly convertible to expected type "uint256[] memory". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/220_struct_constructor.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/220_struct_constructor.sol index 50585c110..fcd9afc19 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/220_struct_constructor.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/220_struct_constructor.sol @@ -6,4 +6,4 @@ contract C { } // ---- // Warning: (80-90): Unused local variable. -// Warning: (50-110): Function state mutability can be restricted to pure +// Warning: (50-110): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/221_struct_constructor_nested.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/221_struct_constructor_nested.sol index 002226825..49b7b9a3f 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/221_struct_constructor_nested.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/221_struct_constructor_nested.sol @@ -8,4 +8,4 @@ contract C { } // ---- // Warning: (153-163): Unused local variable. -// Warning: (96-190): Function state mutability can be restricted to pure +// Warning: (96-190): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/222_struct_named_constructor.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/222_struct_named_constructor.sol index 8ab8ee460..78587ac45 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/222_struct_named_constructor.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/222_struct_named_constructor.sol @@ -6,4 +6,4 @@ contract C { } // ---- // Warning: (80-90): Unused local variable. -// Warning: (50-118): Function state mutability can be restricted to pure +// Warning: (50-118): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/223_literal_strings.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/223_literal_strings.sol index 1dadcc4d6..ced324286 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/223_literal_strings.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/223_literal_strings.sol @@ -6,4 +6,4 @@ contract Foo { } } // ---- -// Warning: (19-238): Function state mutability can be restricted to pure +// Warning: (19-238): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/232_literal_string_to_storage_pointer.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/232_literal_string_to_storage_pointer.sol index be57144ee..fb477d4de 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/232_literal_string_to_storage_pointer.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/232_literal_string_to_storage_pointer.sol @@ -2,4 +2,4 @@ contract C { function f() public { string storage x = "abc"; } } // ---- -// TypeError: (39-63): Type literal_string "abc" is not implicitly convertible to expected type string storage pointer. +// TypeError: (39-63): Type "literal_string "abc"" is not implicitly convertible to expected type "string storage pointer". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/253_using_for_function_exists.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/253_using_for_function_exists.sol index 9e570805f..33ade6aed 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/253_using_for_function_exists.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/253_using_for_function_exists.sol @@ -6,5 +6,5 @@ contract C { } } // ---- -// Warning: (12-79): Function state mutability can be restricted to pure -// Warning: (121-172): Function state mutability can be restricted to pure +// Warning: (12-79): Function state mutability can be restricted to "pure". +// Warning: (121-172): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/254_using_for_function_on_int.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/254_using_for_function_on_int.sol index a8e23d0fa..70a4d5c93 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/254_using_for_function_on_int.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/254_using_for_function_on_int.sol @@ -6,4 +6,4 @@ contract C { } } // ---- -// Warning: (12-79): Function state mutability can be restricted to pure +// Warning: (12-79): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/258_using_for_mismatch.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/258_using_for_mismatch.sol index c60ee651e..d8c692d74 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/258_using_for_mismatch.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/258_using_for_mismatch.sol @@ -6,4 +6,4 @@ contract C { } } // ---- -// TypeError: (177-185): Member "double" not found or not visible after argument-dependent lookup in uint256. +// TypeError: (177-185): Member "double" not found or not visible after argument-dependent lookup in "uint256". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/259_using_for_not_used.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/259_using_for_not_used.sol index b11cefbab..e42478c61 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/259_using_for_not_used.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/259_using_for_not_used.sol @@ -8,4 +8,4 @@ contract C { } } // ---- -// TypeError: (305-313): Member "double" not found or not visible after argument-dependent lookup in uint16. +// TypeError: (305-313): Member "double" not found or not visible after argument-dependent lookup in "uint16". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/261_using_for_arbitrary_mismatch.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/261_using_for_arbitrary_mismatch.sol index b2b553507..6b64f0f9b 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/261_using_for_arbitrary_mismatch.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/261_using_for_arbitrary_mismatch.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// TypeError: (227-235): Member "double" not found or not visible after argument-dependent lookup in uint256. +// TypeError: (227-235): Member "double" not found or not visible after argument-dependent lookup in "uint256". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/262_bound_function_in_var.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/262_bound_function_in_var.sol index c3cc5232d..a461061df 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/262_bound_function_in_var.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/262_bound_function_in_var.sol @@ -9,5 +9,5 @@ contract C { } } // ---- -// TypeError: (218-271): Type function (struct D.s storage pointer,uint256) returns (uint256) is not implicitly convertible to expected type function (struct D.s storage pointer,uint256) returns (uint256). +// TypeError: (218-271): Type "function (struct D.s storage pointer,uint256) returns (uint256)" is not implicitly convertible to expected type "function (struct D.s storage pointer,uint256) returns (uint256)". // TypeError: (298-302): Wrong argument count for function call: 1 arguments given but expected 2. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/263_create_memory_arrays.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/263_create_memory_arrays.sol index 71f43992b..4baa6cb82 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/263_create_memory_arrays.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/263_create_memory_arrays.sol @@ -11,4 +11,4 @@ contract C { } } // ---- -// Warning: (122-301): Function state mutability can be restricted to pure +// Warning: (122-301): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/275_inline_struct_declaration_arrays.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/275_inline_struct_declaration_arrays.sol index bdf033a30..b20737e25 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/275_inline_struct_declaration_arrays.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/275_inline_struct_declaration_arrays.sol @@ -9,4 +9,4 @@ contract C { } // ---- // Warning: (102-115): Unused local variable. -// Warning: (72-169): Function state mutability can be restricted to pure +// Warning: (72-169): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/282_invalid_different_types_for_conditional_expression.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/282_invalid_different_types_for_conditional_expression.sol index e4e75e3f2..4b08d3647 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/282_invalid_different_types_for_conditional_expression.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/282_invalid_different_types_for_conditional_expression.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (47-62): True expression's type bool doesn't match false expression's type uint8. +// TypeError: (47-62): True expression's type "bool" doesn't match false expression's type "uint8". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/284_conditional_expression_with_different_struct.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/284_conditional_expression_with_different_struct.sol index 049d9e21e..1c68457c8 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/284_conditional_expression_with_different_struct.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/284_conditional_expression_with_different_struct.sol @@ -12,4 +12,4 @@ contract C { } } // ---- -// TypeError: (165-177): True expression's type struct C.s1 memory doesn't match false expression's type struct C.s2 memory. +// TypeError: (165-177): True expression's type "struct C.s1 memory" doesn't match false expression's type "struct C.s2 memory". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/285_conditional_expression_with_different_function_type.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/285_conditional_expression_with_different_function_type.sol index 963fb7da6..c12006734 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/285_conditional_expression_with_different_function_type.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/285_conditional_expression_with_different_function_type.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// TypeError: (106-118): True expression's type function (bool) doesn't match false expression's type function (). +// TypeError: (106-118): True expression's type "function (bool)" doesn't match false expression's type "function ()". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/286_conditional_expression_with_different_enum.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/286_conditional_expression_with_different_enum.sol index 8c3126243..a09c9f12c 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/286_conditional_expression_with_different_enum.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/286_conditional_expression_with_different_enum.sol @@ -10,4 +10,4 @@ contract C { } } // ---- -// TypeError: (139-151): True expression's type enum C.small doesn't match false expression's type enum C.big. +// TypeError: (139-151): True expression's type "enum C.small" doesn't match false expression's type "enum C.big". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/287_conditional_expression_with_different_mapping.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/287_conditional_expression_with_different_mapping.sol index 8139f3ed9..b8a33c1b3 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/287_conditional_expression_with_different_mapping.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/287_conditional_expression_with_different_mapping.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// TypeError: (121-143): True expression's type mapping(uint8 => uint8) doesn't match false expression's type mapping(uint32 => uint8). +// TypeError: (121-143): True expression's type "mapping(uint8 => uint8)" doesn't match false expression's type "mapping(uint32 => uint8)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/288_conditional_with_all_types.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/288_conditional_with_all_types.sol index a92c07f38..10e9ae2ed 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/288_conditional_with_all_types.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/288_conditional_with_all_types.sol @@ -85,5 +85,5 @@ contract C { } // ---- // Warning: (1005-1019): This declaration shadows an existing declaration. -// Warning: (257-642): Function state mutability can be restricted to pure -// Warning: (647-1227): Function state mutability can be restricted to pure +// Warning: (257-642): Function state mutability can be restricted to "pure". +// Warning: (647-1227): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/289_uint7_and_uintM_as_identifier.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/289_uint7_and_uintM_as_identifier.sol index 58e84090e..141956878 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/289_uint7_and_uintM_as_identifier.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/289_uint7_and_uintM_as_identifier.sol @@ -9,4 +9,4 @@ string uintM = "Hello 4 you"; } } // ---- -// Warning: (50-197): Function state mutability can be restricted to pure +// Warning: (50-197): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/295_bytes10abc_is_identifier.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/295_bytes10abc_is_identifier.sol index 8b65fc652..737cd8461 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/295_bytes10abc_is_identifier.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/295_bytes10abc_is_identifier.sol @@ -5,4 +5,4 @@ contract test { } // ---- // Warning: (50-68): Unused local variable. -// Warning: (20-83): Function state mutability can be restricted to pure +// Warning: (20-83): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/296_int10abc_is_identifier.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/296_int10abc_is_identifier.sol index 2678cfb98..cd7d34640 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/296_int10abc_is_identifier.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/296_int10abc_is_identifier.sol @@ -6,4 +6,4 @@ contract test { } } // ---- -// Warning: (20-130): Function state mutability can be restricted to pure +// Warning: (20-130): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/301_library_instances_cannot_be_used.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/301_library_instances_cannot_be_used.sol index 3eebc7926..b94dd70ed 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/301_library_instances_cannot_be_used.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/301_library_instances_cannot_be_used.sol @@ -7,4 +7,4 @@ contract test { } // ---- // TypeError: (87-90): The type of a variable cannot be a library. -// TypeError: (100-103): Member "l" not found or not visible after argument-dependent lookup in library L. +// TypeError: (100-103): Member "l" not found or not visible after argument-dependent lookup in "library L". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/303_fixed_type_int_conversion.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/303_fixed_type_int_conversion.sol index 6ef5da3bb..a270959f3 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/303_fixed_type_int_conversion.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/303_fixed_type_int_conversion.sol @@ -9,4 +9,4 @@ contract test { } // ---- // UnimplementedFeatureError: Not yet implemented - FixedPointType. -// Warning: (20-147): Function state mutability can be restricted to pure +// Warning: (20-147): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/304_fixed_type_rational_int_conversion.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/304_fixed_type_rational_int_conversion.sol index e046df6ba..59ad9cdf3 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/304_fixed_type_rational_int_conversion.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/304_fixed_type_rational_int_conversion.sol @@ -7,4 +7,4 @@ contract test { } // ---- // UnimplementedFeatureError: Not yet implemented - FixedPointType. -// Warning: (20-104): Function state mutability can be restricted to pure +// Warning: (20-104): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/305_fixed_type_rational_fraction_conversion.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/305_fixed_type_rational_fraction_conversion.sol index f971dc299..887900ef2 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/305_fixed_type_rational_fraction_conversion.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/305_fixed_type_rational_fraction_conversion.sol @@ -7,4 +7,4 @@ contract test { } // ---- // UnimplementedFeatureError: Not yet implemented - FixedPointType. -// Warning: (20-108): Function state mutability can be restricted to pure +// Warning: (20-108): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/306_invalid_int_implicit_conversion_from_fixed.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/306_invalid_int_implicit_conversion_from_fixed.sol index c0a56314a..e80ffdc3b 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/306_invalid_int_implicit_conversion_from_fixed.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/306_invalid_int_implicit_conversion_from_fixed.sol @@ -6,4 +6,4 @@ contract test { } } // ---- -// TypeError: (73-82): Type fixed128x18 is not implicitly convertible to expected type int256. +// TypeError: (73-82): Type "fixed128x18" is not implicitly convertible to expected type "int256". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/308_rational_unary_plus_operation.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/308_rational_unary_plus_operation.sol index f635a214d..027dc76db 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/308_rational_unary_plus_operation.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/308_rational_unary_plus_operation.sol @@ -6,4 +6,4 @@ contract test { } } // ---- -// SyntaxError: (70-75): Use of unary + is disallowed. +// SyntaxError: (70-75): Use of unary "+" is disallowed. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/313_fixed_type_size_capabilities.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/313_fixed_type_size_capabilities.sol index 295cf4ea4..6c999ec1b 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/313_fixed_type_size_capabilities.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/313_fixed_type_size_capabilities.sol @@ -10,5 +10,5 @@ contract test { } } // ---- -// TypeError: (153-250): Type rational_const 9208...(70 digits omitted)...7637 / 1000...(71 digits omitted)...0000 is not implicitly convertible to expected type ufixed256x77, but it can be explicitly converted. -// TypeError: (470-566): Type rational_const -933...(70 digits omitted)...0123 / 1000...(70 digits omitted)...0000 is not implicitly convertible to expected type fixed256x76, but it can be explicitly converted. +// TypeError: (153-250): Type "rational_const 9208...(70 digits omitted)...7637 / 1000...(71 digits omitted)...0000" is not implicitly convertible to expected type "ufixed256x77", but it can be explicitly converted. +// TypeError: (470-566): Type "rational_const -933...(70 digits omitted)...0123 / 1000...(70 digits omitted)...0000" is not implicitly convertible to expected type "fixed256x76", but it can be explicitly converted. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/314_fixed_type_zero_handling.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/314_fixed_type_zero_handling.sol index be6395792..a26288103 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/314_fixed_type_zero_handling.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/314_fixed_type_zero_handling.sol @@ -6,4 +6,4 @@ contract test { } // ---- // UnimplementedFeatureError: Not yet implemented - FixedPointType. -// Warning: (20-104): Function state mutability can be restricted to pure +// Warning: (20-104): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/315_fixed_type_invalid_implicit_conversion_size.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/315_fixed_type_invalid_implicit_conversion_size.sol index f045731ac..a334252db 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/315_fixed_type_invalid_implicit_conversion_size.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/315_fixed_type_invalid_implicit_conversion_size.sol @@ -5,4 +5,4 @@ contract test { } } // ---- -// TypeError: (75-92): Type ufixed128x18 is not implicitly convertible to expected type ufixed248x8. Too many fractional digits. +// TypeError: (75-92): Type "ufixed128x18" is not implicitly convertible to expected type "ufixed248x8". Too many fractional digits. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/316_fixed_type_invalid_implicit_conversion_lost_data.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/316_fixed_type_invalid_implicit_conversion_lost_data.sol index 76c0284ed..cb3b3f348 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/316_fixed_type_invalid_implicit_conversion_lost_data.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/316_fixed_type_invalid_implicit_conversion_lost_data.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// TypeError: (50-69): Type rational_const 1 / 3 is not implicitly convertible to expected type ufixed256x1. Try converting to type ufixed256x77 or use an explicit conversion. +// TypeError: (50-69): Type "rational_const 1 / 3" is not implicitly convertible to expected type "ufixed256x1". Try converting to type "ufixed256x77" or use an explicit conversion. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/317_fixed_type_valid_explicit_conversions.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/317_fixed_type_valid_explicit_conversions.sol index 46750a533..22c58bcee 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/317_fixed_type_valid_explicit_conversions.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/317_fixed_type_valid_explicit_conversions.sol @@ -7,4 +7,4 @@ contract test { } // ---- // UnimplementedFeatureError: Not yet implemented - FixedPointType. -// Warning: (20-182): Function state mutability can be restricted to pure +// Warning: (20-182): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/321_rational_to_bytes_implicit_conversion.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/321_rational_to_bytes_implicit_conversion.sol index d209eb76a..5c3a3ca4b 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/321_rational_to_bytes_implicit_conversion.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/321_rational_to_bytes_implicit_conversion.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// TypeError: (50-65): Type rational_const 16 / 5 is not implicitly convertible to expected type bytes32. Try converting to type ufixed8x1 or use an explicit conversion. +// TypeError: (50-65): Type "rational_const 16 / 5" is not implicitly convertible to expected type "bytes32". Try converting to type "ufixed8x1" or use an explicit conversion. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/322_fixed_to_bytes_implicit_conversion.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/322_fixed_to_bytes_implicit_conversion.sol index 867364812..0aaf69fa4 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/322_fixed_to_bytes_implicit_conversion.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/322_fixed_to_bytes_implicit_conversion.sol @@ -5,4 +5,4 @@ contract test { } } // ---- -// TypeError: (74-87): Type fixed128x18 is not implicitly convertible to expected type bytes32. +// TypeError: (74-87): Type "fixed128x18" is not implicitly convertible to expected type "bytes32". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/327_rational_index_access.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/327_rational_index_access.sol index 46e585212..4e4beb8d1 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/327_rational_index_access.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/327_rational_index_access.sol @@ -5,4 +5,4 @@ contract test { } } // ---- -// TypeError: (77-79): Type rational_const 1 / 2 is not implicitly convertible to expected type uint256. Try converting to type ufixed8x1 or use an explicit conversion. +// TypeError: (77-79): Type "rational_const 1 / 2" is not implicitly convertible to expected type "uint256". Try converting to type "ufixed8x1" or use an explicit conversion. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/328_rational_to_fixed_literal_expression.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/328_rational_to_fixed_literal_expression.sol index 8582cc089..3d1c762ec 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/328_rational_to_fixed_literal_expression.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/328_rational_to_fixed_literal_expression.sol @@ -13,4 +13,4 @@ contract test { // ---- // UnimplementedFeatureError: Not yet implemented - FixedPointType. // Warning: (238-252): This declaration shadows an existing declaration. -// Warning: (20-339): Function state mutability can be restricted to pure +// Warning: (20-339): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/329_rational_as_exponent_value_signed.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/329_rational_as_exponent_value_signed.sol index b835e3093..7067c348a 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/329_rational_as_exponent_value_signed.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/329_rational_as_exponent_value_signed.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// TypeError: (60-69): Operator ** not compatible with types int_const 2 and rational_const -11 / 5 +// TypeError: (60-69): Operator "**" not compatible with types "int_const 2" and "rational_const -11 / 5". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/330_rational_as_exponent_value_unsigned.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/330_rational_as_exponent_value_unsigned.sol index 04ddf0fd8..b210430fa 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/330_rational_as_exponent_value_unsigned.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/330_rational_as_exponent_value_unsigned.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// TypeError: (61-69): Operator ** not compatible with types int_const 3 and rational_const 5 / 2 +// TypeError: (61-69): Operator "**" not compatible with types "int_const 3" and "rational_const 5 / 2". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/331_rational_as_exponent_half.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/331_rational_as_exponent_half.sol index 4e0894c55..a0fa57a37 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/331_rational_as_exponent_half.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/331_rational_as_exponent_half.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// TypeError: (50-60): Operator ** not compatible with types int_const 2 and rational_const 1 / 2 +// TypeError: (50-60): Operator "**" not compatible with types "int_const 2" and "rational_const 1 / 2". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/332_rational_as_exponent_value_neg_quarter.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/332_rational_as_exponent_value_neg_quarter.sol index bc127bf51..d7e279cd0 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/332_rational_as_exponent_value_neg_quarter.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/332_rational_as_exponent_value_neg_quarter.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// TypeError: (50-62): Operator ** not compatible with types int_const 42 and rational_const -1 / 4 +// TypeError: (50-62): Operator "**" not compatible with types "int_const 42" and "rational_const -1 / 4". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/333_fixed_point_casting_exponents_15.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/333_fixed_point_casting_exponents_15.sol index 0fd5f331f..77631c329 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/333_fixed_point_casting_exponents_15.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/333_fixed_point_casting_exponents_15.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// TypeError: (61-77): Operator ** not compatible with types int_const 3 and ufixed128x18 +// TypeError: (61-77): Operator "**" not compatible with types "int_const 3" and "ufixed128x18". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/334_fixed_point_casting_exponents_neg.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/334_fixed_point_casting_exponents_neg.sol index 03d10f7c0..f8ff9d0dc 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/334_fixed_point_casting_exponents_neg.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/334_fixed_point_casting_exponents_neg.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// TypeError: (61-78): Operator ** not compatible with types int_const 42 and fixed128x18 +// TypeError: (61-78): Operator "**" not compatible with types "int_const 42" and "fixed128x18". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/338_rational_bitnot_unary_operation.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/338_rational_bitnot_unary_operation.sol index 44a6ab5e0..526a6ea14 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/338_rational_bitnot_unary_operation.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/338_rational_bitnot_unary_operation.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// TypeError: (50-61): Unary operator ~ cannot be applied to type fixed128x18 +// TypeError: (50-61): Unary operator "~" cannot be applied to type "fixed128x18". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/339_rational_bitor_binary_operation.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/339_rational_bitor_binary_operation.sol index 29871b04c..1b828fa70 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/339_rational_bitor_binary_operation.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/339_rational_bitor_binary_operation.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// TypeError: (50-64): Operator | not compatible with types fixed128x18 and int_const 3 +// TypeError: (50-64): Operator "|" not compatible with types "fixed128x18" and "int_const 3". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/340_rational_bitxor_binary_operation.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/340_rational_bitxor_binary_operation.sol index 1fa7f38f8..50e4bd4aa 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/340_rational_bitxor_binary_operation.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/340_rational_bitxor_binary_operation.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// TypeError: (50-65): Operator ^ not compatible with types fixed128x18 and int_const 3 +// TypeError: (50-65): Operator "^" not compatible with types "fixed128x18" and "int_const 3". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/341_rational_bitand_binary_operation.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/341_rational_bitand_binary_operation.sol index 5a433a614..cb35813ff 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/341_rational_bitand_binary_operation.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/341_rational_bitand_binary_operation.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// TypeError: (50-65): Operator & not compatible with types fixed128x18 and int_const 3 +// TypeError: (50-65): Operator "&" not compatible with types "fixed128x18" and "int_const 3". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/342_missing_bool_conversion.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/342_missing_bool_conversion.sol index 5546a099a..a372e11fa 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/342_missing_bool_conversion.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/342_missing_bool_conversion.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// Warning: (20-75): Function state mutability can be restricted to pure +// Warning: (20-75): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/343_integer_and_fixed_interaction.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/343_integer_and_fixed_interaction.sol index 3b7c273bd..7c0214aad 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/343_integer_and_fixed_interaction.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/343_integer_and_fixed_interaction.sol @@ -6,4 +6,4 @@ contract test { // ---- // UnimplementedFeatureError: Not yet implemented - FixedPointType. // Warning: (50-58): Unused local variable. -// Warning: (20-89): Function state mutability can be restricted to pure +// Warning: (20-89): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/344_one_divided_by_three_integer_conversion.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/344_one_divided_by_three_integer_conversion.sol index ffc168eb1..3c9b115a1 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/344_one_divided_by_three_integer_conversion.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/344_one_divided_by_three_integer_conversion.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// TypeError: (50-62): Type rational_const 1 / 3 is not implicitly convertible to expected type uint256. Try converting to type ufixed256x77 or use an explicit conversion. +// TypeError: (50-62): Type "rational_const 1 / 3" is not implicitly convertible to expected type "uint256". Try converting to type "ufixed256x77" or use an explicit conversion. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/346_unused_return_value_send.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/346_unused_return_value_send.sol index 929e54b20..78853a6ec 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/346_unused_return_value_send.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/346_unused_return_value_send.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// Warning: (50-71): Failure condition of 'send' ignored. Consider using 'transfer' instead. +// Warning: (50-71): Failure condition of "send" ignored. Consider using "transfer" instead. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/351_callcode_deprecated.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/351_callcode_deprecated.sol index 554f2e11e..220769c40 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/351_callcode_deprecated.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/351_callcode_deprecated.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// TypeError: (55-77): "callcode" has been deprecated in favour of "delegatecall". +// TypeError: (55-77): "callcode" has been deprecated in favour of"delegatecall". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/363_non_payable_constructor.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/363_non_payable_constructor.sol index 944bda0d9..34afd85e4 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/363_non_payable_constructor.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/363_non_payable_constructor.sol @@ -8,4 +8,4 @@ contract D { } } // ---- -// TypeError: (106-119): Constructor for contract C must be payable for member "value" to be available. +// TypeError: (106-119): Constructor for "contract C" must be payable for member "value" to be available. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/367_using_directive_for_missing_selftype.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/367_using_directive_for_missing_selftype.sol index 3d9bc3fc3..247d08bad 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/367_using_directive_for_missing_selftype.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/367_using_directive_for_missing_selftype.sol @@ -11,4 +11,4 @@ contract A { } } // ---- -// TypeError: (137-140): Member "b" not found or not visible after argument-dependent lookup in bytes memory. +// TypeError: (137-140): Member "b" not found or not visible after argument-dependent lookup in "bytes memory". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/368_shift_constant_left_negative_rvalue.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/368_shift_constant_left_negative_rvalue.sol index 9c941a68d..83bfd6e2b 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/368_shift_constant_left_negative_rvalue.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/368_shift_constant_left_negative_rvalue.sol @@ -2,4 +2,4 @@ contract C { uint public a = 0x42 << -8; } // ---- -// TypeError: (33-43): Operator << not compatible with types int_const 66 and int_const -8 +// TypeError: (33-43): Operator "<<" not compatible with types "int_const 66" and "int_const -8". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/369_shift_constant_right_negative_rvalue.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/369_shift_constant_right_negative_rvalue.sol index 55f385c67..f04676404 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/369_shift_constant_right_negative_rvalue.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/369_shift_constant_right_negative_rvalue.sol @@ -2,4 +2,4 @@ contract C { uint public a = 0x42 >> -8; } // ---- -// TypeError: (33-43): Operator >> not compatible with types int_const 66 and int_const -8 +// TypeError: (33-43): Operator ">>" not compatible with types "int_const 66" and "int_const -8". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/370_shift_constant_left_excessive_rvalue.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/370_shift_constant_left_excessive_rvalue.sol index e23c7a84a..1f6b14352 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/370_shift_constant_left_excessive_rvalue.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/370_shift_constant_left_excessive_rvalue.sol @@ -2,4 +2,4 @@ contract C { uint public a = 0x42 << 0x100000000; } // ---- -// TypeError: (33-52): Operator << not compatible with types int_const 66 and int_const 4294967296 +// TypeError: (33-52): Operator "<<" not compatible with types "int_const 66" and "int_const 4294967296". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/371_shift_constant_right_excessive_rvalue.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/371_shift_constant_right_excessive_rvalue.sol index 5533644f3..61b7fa70e 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/371_shift_constant_right_excessive_rvalue.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/371_shift_constant_right_excessive_rvalue.sol @@ -2,4 +2,4 @@ contract C { uint public a = 0x42 >> 0x100000000; } // ---- -// TypeError: (33-52): Operator >> not compatible with types int_const 66 and int_const 4294967296 +// TypeError: (33-52): Operator ">>" not compatible with types "int_const 66" and "int_const 4294967296". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/372_shift_constant_right_fractional.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/372_shift_constant_right_fractional.sol index 38d9b051c..1c277d7c9 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/372_shift_constant_right_fractional.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/372_shift_constant_right_fractional.sol @@ -2,4 +2,4 @@ contract C { uint public a = 0x42 >> (1 / 2); } // ---- -// TypeError: (33-48): Operator >> not compatible with types int_const 66 and rational_const 1 / 2 +// TypeError: (33-48): Operator ">>" not compatible with types "int_const 66" and "rational_const 1 / 2". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/406_invalid_address_checksum.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/406_invalid_address_checksum.sol index fe4691c22..9ca145d4e 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/406_invalid_address_checksum.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/406_invalid_address_checksum.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// SyntaxError: (64-106): This looks like an address but has an invalid checksum. Correct checksummed address: "0xfA0bFc97E48458494Ccd857e1A85DC91F7F0046E". If this is not used as an address, please prepend '00'. For more information please see https://solidity.readthedocs.io/en/develop/types.html#address-literals +// SyntaxError: (64-106): This looks like an address but has an invalid checksum. Correct checksummed address: "0xfA0bFc97E48458494Ccd857e1A85DC91F7F0046E". If this is not used as an address, please prepend "00". For more information please see https://solidity.readthedocs.io/en/develop/types.html#address-literals diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/407_invalid_address_no_checksum.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/407_invalid_address_no_checksum.sol index 6f4ac730d..cc924ae3b 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/407_invalid_address_no_checksum.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/407_invalid_address_no_checksum.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// SyntaxError: (64-106): This looks like an address but has an invalid checksum. Correct checksummed address: "0xfA0bFc97E48458494Ccd857e1A85DC91F7F0046E". If this is not used as an address, please prepend '00'. For more information please see https://solidity.readthedocs.io/en/develop/types.html#address-literals +// SyntaxError: (64-106): This looks like an address but has an invalid checksum. Correct checksummed address: "0xfA0bFc97E48458494Ccd857e1A85DC91F7F0046E". If this is not used as an address, please prepend "00". For more information please see https://solidity.readthedocs.io/en/develop/types.html#address-literals diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/408_invalid_address_length_short.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/408_invalid_address_length_short.sol index da5dc3803..4b3a4cb57 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/408_invalid_address_length_short.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/408_invalid_address_length_short.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// SyntaxError: (64-105): This looks like an address but is not exactly 40 hex digits. It is 39 hex digits. If this is not used as an address, please prepend '00'. For more information please see https://solidity.readthedocs.io/en/develop/types.html#address-literals +// SyntaxError: (64-105): This looks like an address but is not exactly 40 hex digits. It is 39 hex digits. If this is not used as an address, please prepend "00". For more information please see https://solidity.readthedocs.io/en/develop/types.html#address-literals diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/409_invalid_address_length_long.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/409_invalid_address_length_long.sol index 749612c9c..3eba2f489 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/409_invalid_address_length_long.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/409_invalid_address_length_long.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// SyntaxError: (64-107): This looks like an address but is not exactly 40 hex digits. It is 41 hex digits. If this is not used as an address, please prepend '00'. For more information please see https://solidity.readthedocs.io/en/develop/types.html#address-literals +// SyntaxError: (64-107): This looks like an address but is not exactly 40 hex digits. It is 41 hex digits. If this is not used as an address, please prepend "00". For more information please see https://solidity.readthedocs.io/en/develop/types.html#address-literals diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/410_string_literal_not_convertible_to_address_as_assignment.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/410_string_literal_not_convertible_to_address_as_assignment.sol index 13bd1a8fb..d3fc920e2 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/410_string_literal_not_convertible_to_address_as_assignment.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/410_string_literal_not_convertible_to_address_as_assignment.sol @@ -3,4 +3,4 @@ contract AddrString { address public test = "0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c"; } // ---- -// TypeError: (116-160): Type literal_string "0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c" is not implicitly convertible to expected type address. +// TypeError: (116-160): Type "literal_string "0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c"" is not implicitly convertible to expected type "address". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/411_string_literal_not_convertible_to_address_as_return_value.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/411_string_literal_not_convertible_to_address_as_return_value.sol index d6b7b987e..17501c850 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/411_string_literal_not_convertible_to_address_as_return_value.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/411_string_literal_not_convertible_to_address_as_return_value.sol @@ -5,4 +5,4 @@ contract AddrString { } } // ---- -// TypeError: (149-193): Return argument type literal_string "0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c" is not implicitly convertible to expected type (type of first return variable) address. +// TypeError: (149-193): Return argument type "literal_string "0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c"" is not implicitly convertible to expected type (type of first return variable) "address". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/475_implicit_conversion_disallowed.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/475_implicit_conversion_disallowed.sol index 232e701df..0dd956810 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/475_implicit_conversion_disallowed.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/475_implicit_conversion_disallowed.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (95-98): Return argument type uint32 is not implicitly convertible to expected type (type of first return variable) bytes4. +// TypeError: (95-98): Return argument type "uint32" is not implicitly convertible to expected type (type of first return variable) "bytes4". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/480_explicit_literal_to_storage_string_assignment.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/480_explicit_literal_to_storage_string_assignment.sol index ee56204a8..9f7df9702 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/480_explicit_literal_to_storage_string_assignment.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/480_explicit_literal_to_storage_string_assignment.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (52-76): Type literal_string "abc" is not implicitly convertible to expected type string storage pointer. +// TypeError: (52-76): Type "literal_string "abc"" is not implicitly convertible to expected type "string storage pointer". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/481_explicit_literal_to_unspecified_string_assignment.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/481_explicit_literal_to_unspecified_string_assignment.sol index ee56204a8..9f7df9702 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/481_explicit_literal_to_unspecified_string_assignment.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/481_explicit_literal_to_unspecified_string_assignment.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (52-76): Type literal_string "abc" is not implicitly convertible to expected type string storage pointer. +// TypeError: (52-76): Type "literal_string "abc"" is not implicitly convertible to expected type "string storage pointer". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/484_function_types_selector_1.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/484_function_types_selector_1.sol index 41ef95c5f..188510779 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/484_function_types_selector_1.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/484_function_types_selector_1.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (76-86): Member "selector" not found or not visible after argument-dependent lookup in function () view returns (bytes4). +// TypeError: (76-86): Member "selector" not found or not visible after argument-dependent lookup in "function () view returns (bytes4)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/485_function_types_selector_2.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/485_function_types_selector_2.sol index d02b098d6..9d6b304dc 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/485_function_types_selector_2.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/485_function_types_selector_2.sol @@ -6,4 +6,4 @@ contract C { } } // ---- -// TypeError: (115-125): Member "selector" not found or not visible after argument-dependent lookup in function () pure. +// TypeError: (115-125): Member "selector" not found or not visible after argument-dependent lookup in "function () pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/486_function_types_selector_3.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/486_function_types_selector_3.sol index d39fcc288..a6296e489 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/486_function_types_selector_3.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/486_function_types_selector_3.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (99-109): Member "selector" not found or not visible after argument-dependent lookup in function (). +// TypeError: (99-109): Member "selector" not found or not visible after argument-dependent lookup in "function ()". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/492_do_not_crash_on_not_lvalue.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/492_do_not_crash_on_not_lvalue.sol index 902758049..61c89832f 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/492_do_not_crash_on_not_lvalue.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/492_do_not_crash_on_not_lvalue.sol @@ -8,4 +8,4 @@ contract C { // ---- // TypeError: (153-157): Type is not callable // TypeError: (153-157): Expression has to be an lvalue. -// TypeError: (160-161): Type int_const 2 is not implicitly convertible to expected type tuple(). +// TypeError: (160-161): Type "int_const 2" is not implicitly convertible to expected type "tuple()". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/493_builtin_keccak256_reject_gas.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/493_builtin_keccak256_reject_gas.sol index e41139061..4bca9042d 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/493_builtin_keccak256_reject_gas.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/493_builtin_keccak256_reject_gas.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (47-60): Member "gas" not found or not visible after argument-dependent lookup in function (bytes memory) pure returns (bytes32). +// TypeError: (47-60): Member "gas" not found or not visible after argument-dependent lookup in "function (bytes memory) pure returns (bytes32)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/494_builtin_sha256_reject_gas.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/494_builtin_sha256_reject_gas.sol index 20031ea9a..6cba4cc9f 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/494_builtin_sha256_reject_gas.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/494_builtin_sha256_reject_gas.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (47-57): Member "gas" not found or not visible after argument-dependent lookup in function (bytes memory) pure returns (bytes32). +// TypeError: (47-57): Member "gas" not found or not visible after argument-dependent lookup in "function (bytes memory) pure returns (bytes32)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/495_builtin_ripemd160_reject_gas.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/495_builtin_ripemd160_reject_gas.sol index 3d37e9886..ef6d66533 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/495_builtin_ripemd160_reject_gas.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/495_builtin_ripemd160_reject_gas.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (47-60): Member "gas" not found or not visible after argument-dependent lookup in function (bytes memory) pure returns (bytes20). +// TypeError: (47-60): Member "gas" not found or not visible after argument-dependent lookup in "function (bytes memory) pure returns (bytes20)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/496_builtin_ecrecover_reject_gas.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/496_builtin_ecrecover_reject_gas.sol index 82b6c89db..12120fe0c 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/496_builtin_ecrecover_reject_gas.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/496_builtin_ecrecover_reject_gas.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (47-60): Member "gas" not found or not visible after argument-dependent lookup in function (bytes32,uint8,bytes32,bytes32) pure returns (address). +// TypeError: (47-60): Member "gas" not found or not visible after argument-dependent lookup in "function (bytes32,uint8,bytes32,bytes32) pure returns (address)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/498_msg_gas_deprecated.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/498_msg_gas_deprecated.sol index 5efecd224..6768e9927 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/498_msg_gas_deprecated.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/498_msg_gas_deprecated.sol @@ -2,4 +2,4 @@ contract C { function f() public view returns (uint256 val) { return msg.gas; } } // ---- -// TypeError: (73-80): "msg.gas" has been deprecated in favor of "gasleft()" +// TypeError: (73-80): "msg.gas" has been deprecated in favor of "gasleft()". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/530_tuple_invalid_literal_too_large_for_uint.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/530_tuple_invalid_literal_too_large_for_uint.sol index bbfe22066..c63d7b1e5 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/530_tuple_invalid_literal_too_large_for_uint.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/530_tuple_invalid_literal_too_large_for_uint.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (76-83): Type int_const 1000...(104 digits omitted)...0000 is not implicitly convertible to expected type tuple(uint256,). +// TypeError: (76-83): Type "int_const 1000...(104 digits omitted)...0000" is not implicitly convertible to expected type "tuple(uint256,)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/535_address_overload_resolution.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/535_address_overload_resolution.sol index a0ac32ba2..21aef2ee5 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/535_address_overload_resolution.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/535_address_overload_resolution.sol @@ -17,4 +17,4 @@ contract D { } } // ---- -// Warning: (17-134): Function state mutability can be restricted to view +// Warning: (17-134): Function state mutability can be restricted to "view". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/540_array_length_invalid_expression_division_by_zero.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/540_array_length_invalid_expression_division_by_zero.sol index 38a80867d..b7b28b18f 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/540_array_length_invalid_expression_division_by_zero.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/540_array_length_invalid_expression_division_by_zero.sol @@ -2,4 +2,4 @@ contract C { uint[3/0] ids; } // ---- -// TypeError: (22-25): Operator / not compatible with types int_const 3 and int_const 0 +// TypeError: (22-25): Operator "/" not compatible with types "int_const 3" and "int_const 0". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/541_warn_about_address_members_on_contract_balance.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/541_warn_about_address_members_on_contract_balance.sol index 39edaa2db..74241d005 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/541_warn_about_address_members_on_contract_balance.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/541_warn_about_address_members_on_contract_balance.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (52-64): Member "balance" not found or not visible after argument-dependent lookup in contract C. Use "address(this).balance" to access this address member. +// TypeError: (52-64): Member "balance" not found or not visible after argument-dependent lookup in "contract C". Use "address(this).balance" to access this address member. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/542_warn_about_address_members_on_contract_transfer.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/542_warn_about_address_members_on_contract_transfer.sol index a44cc6d2c..d85432941 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/542_warn_about_address_members_on_contract_transfer.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/542_warn_about_address_members_on_contract_transfer.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (52-65): Member "transfer" not found or not visible after argument-dependent lookup in contract C. Use "address(this).transfer" to access this address member. +// TypeError: (52-65): Member "transfer" not found or not visible after argument-dependent lookup in "contract C". Use "address(this).transfer" to access this address member. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/543_warn_about_address_members_on_contract_send.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/543_warn_about_address_members_on_contract_send.sol index e9e26a000..125dd39e2 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/543_warn_about_address_members_on_contract_send.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/543_warn_about_address_members_on_contract_send.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (52-61): Member "send" not found or not visible after argument-dependent lookup in contract C. Use "address(this).send" to access this address member. +// TypeError: (52-61): Member "send" not found or not visible after argument-dependent lookup in "contract C". Use "address(this).send" to access this address member. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/544_warn_about_address_members_on_contract_call.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/544_warn_about_address_members_on_contract_call.sol index 16da75789..77a30e9c7 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/544_warn_about_address_members_on_contract_call.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/544_warn_about_address_members_on_contract_call.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (52-61): Member "call" not found or not visible after argument-dependent lookup in contract C. Use "address(this).call" to access this address member. +// TypeError: (52-61): Member "call" not found or not visible after argument-dependent lookup in "contract C". Use "address(this).call" to access this address member. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/545_warn_about_address_members_on_contract_callcode.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/545_warn_about_address_members_on_contract_callcode.sol index 9292f9c07..d634736cc 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/545_warn_about_address_members_on_contract_callcode.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/545_warn_about_address_members_on_contract_callcode.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (52-65): Member "callcode" not found or not visible after argument-dependent lookup in contract C. Use "address(this).callcode" to access this address member. +// TypeError: (52-65): Member "callcode" not found or not visible after argument-dependent lookup in "contract C". Use "address(this).callcode" to access this address member. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/546_warn_about_address_members_on_contract_delegatecall.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/546_warn_about_address_members_on_contract_delegatecall.sol index 20354991f..5f0a1c8b4 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/546_warn_about_address_members_on_contract_delegatecall.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/546_warn_about_address_members_on_contract_delegatecall.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (52-69): Member "delegatecall" not found or not visible after argument-dependent lookup in contract C. Use "address(this).delegatecall" to access this address member. +// TypeError: (52-69): Member "delegatecall" not found or not visible after argument-dependent lookup in "contract C". Use "address(this).delegatecall" to access this address member. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/547_warn_about_address_members_on_non_this_contract_balance.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/547_warn_about_address_members_on_non_this_contract_balance.sol index 8a4734e67..9f38a610c 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/547_warn_about_address_members_on_non_this_contract_balance.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/547_warn_about_address_members_on_non_this_contract_balance.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (65-74): Member "balance" not found or not visible after argument-dependent lookup in contract C. Use "address(c).balance" to access this address member. +// TypeError: (65-74): Member "balance" not found or not visible after argument-dependent lookup in "contract C". Use "address(c).balance" to access this address member. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/548_warn_about_address_members_on_non_this_contract_transfer.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/548_warn_about_address_members_on_non_this_contract_transfer.sol index e617f5404..7b1de078d 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/548_warn_about_address_members_on_non_this_contract_transfer.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/548_warn_about_address_members_on_non_this_contract_transfer.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (65-75): Member "transfer" not found or not visible after argument-dependent lookup in contract C. Use "address(c).transfer" to access this address member. +// TypeError: (65-75): Member "transfer" not found or not visible after argument-dependent lookup in "contract C". Use "address(c).transfer" to access this address member. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/549_warn_about_address_members_on_non_this_contract_send.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/549_warn_about_address_members_on_non_this_contract_send.sol index 54965d4b2..b0370c88d 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/549_warn_about_address_members_on_non_this_contract_send.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/549_warn_about_address_members_on_non_this_contract_send.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (65-71): Member "send" not found or not visible after argument-dependent lookup in contract C. Use "address(c).send" to access this address member. +// TypeError: (65-71): Member "send" not found or not visible after argument-dependent lookup in "contract C". Use "address(c).send" to access this address member. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/550_warn_about_address_members_on_non_this_contract_call.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/550_warn_about_address_members_on_non_this_contract_call.sol index 940f383c5..375b768fa 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/550_warn_about_address_members_on_non_this_contract_call.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/550_warn_about_address_members_on_non_this_contract_call.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (65-71): Member "call" not found or not visible after argument-dependent lookup in contract C. Use "address(c).call" to access this address member. +// TypeError: (65-71): Member "call" not found or not visible after argument-dependent lookup in "contract C". Use "address(c).call" to access this address member. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/551_warn_about_address_members_on_non_this_contract_callcode.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/551_warn_about_address_members_on_non_this_contract_callcode.sol index 9d4725bd0..2884437cc 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/551_warn_about_address_members_on_non_this_contract_callcode.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/551_warn_about_address_members_on_non_this_contract_callcode.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (65-75): Member "callcode" not found or not visible after argument-dependent lookup in contract C. Use "address(c).callcode" to access this address member. +// TypeError: (65-75): Member "callcode" not found or not visible after argument-dependent lookup in "contract C". Use "address(c).callcode" to access this address member. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/552_warn_about_address_members_on_non_this_contract_delegatecall.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/552_warn_about_address_members_on_non_this_contract_delegatecall.sol index 9941ce1f9..f882859b3 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/552_warn_about_address_members_on_non_this_contract_delegatecall.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/552_warn_about_address_members_on_non_this_contract_delegatecall.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (65-79): Member "delegatecall" not found or not visible after argument-dependent lookup in contract C. Use "address(c).delegatecall" to access this address member. +// TypeError: (65-79): Member "delegatecall" not found or not visible after argument-dependent lookup in "contract C". Use "address(c).delegatecall" to access this address member. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/569_block_blockhash_deprecated.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/569_block_blockhash_deprecated.sol index b8f5d6a81..22210b524 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/569_block_blockhash_deprecated.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/569_block_blockhash_deprecated.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (77-92): "block.blockhash()" has been deprecated in favor of "blockhash()" +// TypeError: (77-92): "block.blockhash()" has been deprecated in favor of "blockhash()". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/575_member_member_getter_call_without_parentheses.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/575_member_member_getter_call_without_parentheses.sol index 61f431036..2b3902912 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/575_member_member_getter_call_without_parentheses.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/575_member_member_getter_call_without_parentheses.sol @@ -16,4 +16,4 @@ contract D{ } } // ---- -// TypeError: (170-175): Member "a" not found or not visible after argument-dependent lookup in function () view external returns (contract B). Did you intend to call the function? +// TypeError: (170-175): Member "a" not found or not visible after argument-dependent lookup in "function () view external returns (contract B)". Did you intend to call the function? diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/576_member_getter_call_without_parentheses.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/576_member_getter_call_without_parentheses.sol index bdc5fdc7e..70eae26d4 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/576_member_getter_call_without_parentheses.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/576_member_getter_call_without_parentheses.sol @@ -14,4 +14,4 @@ contract C{ } // ---- -// TypeError: (140-145): Member "f" not found or not visible after argument-dependent lookup in function () view external returns (contract A). Did you intend to call the function? +// TypeError: (140-145): Member "f" not found or not visible after argument-dependent lookup in "function () view external returns (contract A)". Did you intend to call the function? diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/577_member_getter_call_without_parentheses_missing_function.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/577_member_getter_call_without_parentheses_missing_function.sol index d204d9268..f8f9c2d4b 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/577_member_getter_call_without_parentheses_missing_function.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/577_member_getter_call_without_parentheses_missing_function.sol @@ -12,4 +12,4 @@ contract C{ } // ---- -// TypeError: (104-109): Member "f" not found or not visible after argument-dependent lookup in function () view external returns (contract A). Did you intend to call the function? +// TypeError: (104-109): Member "f" not found or not visible after argument-dependent lookup in "function () view external returns (contract A)". Did you intend to call the function? diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/578_private_member_getter_call_without_parentheses.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/578_private_member_getter_call_without_parentheses.sol index e71da3722..a87af4b55 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/578_private_member_getter_call_without_parentheses.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/578_private_member_getter_call_without_parentheses.sol @@ -14,4 +14,4 @@ contract C{ } // ---- -// TypeError: (141-144): Member "a" not found or not visible after argument-dependent lookup in contract B. +// TypeError: (141-144): Member "a" not found or not visible after argument-dependent lookup in "contract B". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/579_member_getter_call_without_parentheses_private_function.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/579_member_getter_call_without_parentheses_private_function.sol index 189322380..fbd15beea 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/579_member_getter_call_without_parentheses_private_function.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/579_member_getter_call_without_parentheses_private_function.sol @@ -14,4 +14,4 @@ contract C{ } // ---- -// TypeError: (141-146): Member "f" not found or not visible after argument-dependent lookup in function () view external returns (contract A). Did you intend to call the function? +// TypeError: (141-146): Member "f" not found or not visible after argument-dependent lookup in "function () view external returns (contract A)". Did you intend to call the function? diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/585_abi_decode_with_unsupported_types.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/585_abi_decode_with_unsupported_types.sol index f2ad3f563..d756c68bc 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/585_abi_decode_with_unsupported_types.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/585_abi_decode_with_unsupported_types.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (98-99): Decoding type struct C.s memory not supported. +// TypeError: (98-99): Decoding type "struct C.s memory" not supported. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/compoundAssignment/incomp_types.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/compoundAssignment/incomp_types.sol index 7f2139bf7..fe3885b75 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/compoundAssignment/incomp_types.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/compoundAssignment/incomp_types.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (72-83): Operator += not compatible with types uint256 and tuple(int_const 1,int_const 1) +// TypeError: (72-83): Operator "+=" not compatible with types "uint256" and "tuple(int_const 1,int_const 1)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/invalidArgs/creating_struct_members_skipped.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/invalidArgs/creating_struct_members_skipped.sol index 1e954ab6c..d706e0e2a 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/invalidArgs/creating_struct_members_skipped.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/invalidArgs/creating_struct_members_skipped.sol @@ -6,4 +6,4 @@ contract C { } } // ---- -// TypeError: (117-126): Wrong argument count for struct constructor: 1 arguments given but expected 2. Members that have to be skipped in memory: c +// TypeError: (117-126): Wrong argument count for struct constructor: 1 arguments given but expected 2. Members that have to be skipped in memory: "c". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/invalidTypes/conditional_expression.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/invalidTypes/conditional_expression.sol index 4cb3f6292..20b6da8e3 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/invalidTypes/conditional_expression.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/invalidTypes/conditional_expression.sol @@ -9,8 +9,8 @@ contract C { } // ---- // TypeError: (92-98): Invalid mobile type in true expression. -// TypeError: (85-103): Invalid type for argument in function call. Invalid implicit conversion from uint8 to bytes1 requested. +// TypeError: (85-103): Invalid type for argument in function call. Invalid implicit conversion from "uint8" to "bytes1" requested. // TypeError: (128-134): Invalid mobile type in false expression. -// TypeError: (116-134): Invalid type for argument in function call. Invalid implicit conversion from uint8 to bytes1 requested. +// TypeError: (116-134): Invalid type for argument in function call. Invalid implicit conversion from "uint8" to "bytes1" requested. // TypeError: (155-161): Invalid mobile type in true expression. // TypeError: (164-170): Invalid mobile type in false expression. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/invalidTypes/constructor_call.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/invalidTypes/constructor_call.sol index b1416ddec..37c23a7d8 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/invalidTypes/constructor_call.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/invalidTypes/constructor_call.sol @@ -9,4 +9,4 @@ contract A { } } // ---- -// TypeError: (115-121): Invalid type for argument in function call. Invalid implicit conversion from int_const 1234 to bytes32 requested. +// TypeError: (115-121): Invalid type for argument in function call. Invalid implicit conversion from "int_const 1234" to "bytes32" requested. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/typeChecking/return.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/typeChecking/return.sol index d0e871390..acad434c5 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/typeChecking/return.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/typeChecking/return.sol @@ -2,4 +2,4 @@ contract test { function f() public returns (bool r) { return 1 >= 2; } } // ---- -// Warning: (20-75): Function state mutability can be restricted to pure +// Warning: (20-75): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/typeChecking/return_tuple_not_convertible.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/typeChecking/return_tuple_not_convertible.sol index cd6f71f28..e78c32408 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/typeChecking/return_tuple_not_convertible.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/typeChecking/return_tuple_not_convertible.sol @@ -2,4 +2,4 @@ contract test { function f() public returns (uint256 r, uint8) { return ((12, "")); } } // ---- -// TypeError: (76-86): Return argument type tuple(int_const 12,literal_string "") is not implicitly convertible to expected type tuple(uint256,uint8). +// TypeError: (76-86): Return argument type "tuple(int_const 12,literal_string "")" is not implicitly convertible to expected type "tuple(uint256,uint8)". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/typeChecking/return_wrong_type.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/typeChecking/return_wrong_type.sol index a7459ae8e..ea01fd4dc 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/typeChecking/return_wrong_type.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/typeChecking/return_wrong_type.sol @@ -2,4 +2,4 @@ contract test { function f() public returns (uint256 r) { return 1 >= 2; } } // ---- -// TypeError: (69-75): Return argument type bool is not implicitly convertible to expected type (type of first return variable) uint256. +// TypeError: (69-75): Return argument type "bool" is not implicitly convertible to expected type (type of first return variable) "uint256". diff --git a/test/libsolidity/syntaxTests/natspec/docstring_empty_description.sol b/test/libsolidity/syntaxTests/natspec/docstring_empty_description.sol index cc8a31f3a..62a76f8ec 100644 --- a/test/libsolidity/syntaxTests/natspec/docstring_empty_description.sol +++ b/test/libsolidity/syntaxTests/natspec/docstring_empty_description.sol @@ -3,4 +3,4 @@ contract C { function vote(uint id) public {} } // ---- -// DocstringParsingError: No description given for param id +// DocstringParsingError: No description given for param "id". diff --git a/test/libsolidity/syntaxTests/natspec/docstring_empty_tag.sol b/test/libsolidity/syntaxTests/natspec/docstring_empty_tag.sol index 2e2584407..82a567421 100644 --- a/test/libsolidity/syntaxTests/natspec/docstring_empty_tag.sol +++ b/test/libsolidity/syntaxTests/natspec/docstring_empty_tag.sol @@ -3,4 +3,4 @@ abstract contract C { function vote(uint id) public {} } // ---- -// DocstringParsingError: End of tag @param not found +// DocstringParsingError: End of tag "@param" not found. diff --git a/test/libsolidity/syntaxTests/parsing/address_constant_payable.sol b/test/libsolidity/syntaxTests/parsing/address_constant_payable.sol index d98f4ae3d..860f387aa 100644 --- a/test/libsolidity/syntaxTests/parsing/address_constant_payable.sol +++ b/test/libsolidity/syntaxTests/parsing/address_constant_payable.sol @@ -2,4 +2,4 @@ contract C { address constant payable b = address(0); } // ---- -// ParserError: (34-41): Expected identifier but got 'payable' +// ParserError: (34-41): Expected identifier but got "payable" diff --git a/test/libsolidity/syntaxTests/parsing/address_payable_conversion.sol b/test/libsolidity/syntaxTests/parsing/address_payable_conversion.sol index bf073a52a..554678c44 100644 --- a/test/libsolidity/syntaxTests/parsing/address_payable_conversion.sol +++ b/test/libsolidity/syntaxTests/parsing/address_payable_conversion.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// ParserError: (80-87): Expected ';' but got 'payable' +// ParserError: (80-87): Expected ";" but got "payable" diff --git a/test/libsolidity/syntaxTests/parsing/address_payable_type_expression.sol b/test/libsolidity/syntaxTests/parsing/address_payable_type_expression.sol index 394b39c09..7a39adec6 100644 --- a/test/libsolidity/syntaxTests/parsing/address_payable_type_expression.sol +++ b/test/libsolidity/syntaxTests/parsing/address_payable_type_expression.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// ParserError: (67-68): Expected identifier but got ';' +// ParserError: (67-68): Expected identifier but got ";" diff --git a/test/libsolidity/syntaxTests/parsing/address_public_payable_error.sol b/test/libsolidity/syntaxTests/parsing/address_public_payable_error.sol index 0acf5e4be..545e52e66 100644 --- a/test/libsolidity/syntaxTests/parsing/address_public_payable_error.sol +++ b/test/libsolidity/syntaxTests/parsing/address_public_payable_error.sol @@ -2,4 +2,4 @@ contract C { address public payable a; } // ---- -// ParserError: (32-39): Expected identifier but got 'payable' +// ParserError: (32-39): Expected identifier but got "payable" diff --git a/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol b/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol index 4c1f96e6e..a3f23ff1d 100644 --- a/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol +++ b/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol @@ -2,5 +2,5 @@ contract c { function f() public { c[10] storage a = 7; uint8[10 * 2] storage x; } } // ---- -// TypeError: (39-58): Type int_const 7 is not implicitly convertible to expected type contract c[10] storage pointer. +// TypeError: (39-58): Type "int_const 7" is not implicitly convertible to expected type "contract c[10] storage pointer". // DeclarationError: (60-83): Uninitialized storage pointer. diff --git a/test/libsolidity/syntaxTests/parsing/conditional_multiple.sol b/test/libsolidity/syntaxTests/parsing/conditional_multiple.sol index 0e348f5b7..340993e00 100644 --- a/test/libsolidity/syntaxTests/parsing/conditional_multiple.sol +++ b/test/libsolidity/syntaxTests/parsing/conditional_multiple.sol @@ -5,4 +5,4 @@ contract A { } // ---- // Warning: (47-53): Unused local variable. -// Warning: (17-100): Function state mutability can be restricted to pure +// Warning: (17-100): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/parsing/conditional_true_false_literal.sol b/test/libsolidity/syntaxTests/parsing/conditional_true_false_literal.sol index 40aaa9170..c1a82feb6 100644 --- a/test/libsolidity/syntaxTests/parsing/conditional_true_false_literal.sol +++ b/test/libsolidity/syntaxTests/parsing/conditional_true_false_literal.sol @@ -7,4 +7,4 @@ contract A { // ---- // Warning: (47-53): Unused local variable. // Warning: (78-84): Unused local variable. -// Warning: (17-107): Function state mutability can be restricted to pure +// Warning: (17-107): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/parsing/conditional_with_constants.sol b/test/libsolidity/syntaxTests/parsing/conditional_with_constants.sol index 705fbadf3..84b1b4de8 100644 --- a/test/libsolidity/syntaxTests/parsing/conditional_with_constants.sol +++ b/test/libsolidity/syntaxTests/parsing/conditional_with_constants.sol @@ -7,4 +7,4 @@ contract A { // ---- // Warning: (47-53): Unused local variable. // Warning: (79-85): Unused local variable. -// Warning: (17-110): Function state mutability can be restricted to pure +// Warning: (17-110): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/parsing/conditional_with_variables.sol b/test/libsolidity/syntaxTests/parsing/conditional_with_variables.sol index bbabf9578..d35c29fcd 100644 --- a/test/libsolidity/syntaxTests/parsing/conditional_with_variables.sol +++ b/test/libsolidity/syntaxTests/parsing/conditional_with_variables.sol @@ -9,4 +9,4 @@ contract A { // ---- // Warning: (87-93): Unused local variable. // Warning: (121-127): Unused local variable. -// Warning: (17-150): Function state mutability can be restricted to pure +// Warning: (17-150): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/parsing/constant_is_keyword.sol b/test/libsolidity/syntaxTests/parsing/constant_is_keyword.sol index 26d126cea..85203cd3f 100644 --- a/test/libsolidity/syntaxTests/parsing/constant_is_keyword.sol +++ b/test/libsolidity/syntaxTests/parsing/constant_is_keyword.sol @@ -2,4 +2,4 @@ contract Foo { uint constant = 4; } // ---- -// ParserError: (30-31): Expected identifier but got '=' +// ParserError: (30-31): Expected identifier but got "=" diff --git a/test/libsolidity/syntaxTests/parsing/declaring_fixed_and_ufixed_variables.sol b/test/libsolidity/syntaxTests/parsing/declaring_fixed_and_ufixed_variables.sol index 2cbf29e0d..8dea1a4ae 100644 --- a/test/libsolidity/syntaxTests/parsing/declaring_fixed_and_ufixed_variables.sol +++ b/test/libsolidity/syntaxTests/parsing/declaring_fixed_and_ufixed_variables.sol @@ -11,4 +11,4 @@ contract A { // Warning: (62-74): Unused function parameter. Remove or comment out the variable name to silence this warning. // Warning: (93-104): Unused local variable. // Warning: (114-121): Unused local variable. -// Warning: (41-128): Function state mutability can be restricted to pure +// Warning: (41-128): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/parsing/declaring_fixed_literal_variables.sol b/test/libsolidity/syntaxTests/parsing/declaring_fixed_literal_variables.sol index b0d938a01..111aeb1d1 100644 --- a/test/libsolidity/syntaxTests/parsing/declaring_fixed_literal_variables.sol +++ b/test/libsolidity/syntaxTests/parsing/declaring_fixed_literal_variables.sol @@ -2,4 +2,4 @@ contract A { fixed40x40 pi = 3.14; } // ---- -// TypeError: (33-37): Type rational_const 157 / 50 is not implicitly convertible to expected type fixed40x40. Try converting to type ufixed16x2 or use an explicit conversion. +// TypeError: (33-37): Type "rational_const 157 / 50" is not implicitly convertible to expected type "fixed40x40". Try converting to type "ufixed16x2" or use an explicit conversion. diff --git a/test/libsolidity/syntaxTests/parsing/else_if_statement.sol b/test/libsolidity/syntaxTests/parsing/else_if_statement.sol index c2a1aaeb7..cd120472c 100644 --- a/test/libsolidity/syntaxTests/parsing/else_if_statement.sol +++ b/test/libsolidity/syntaxTests/parsing/else_if_statement.sol @@ -4,4 +4,4 @@ contract test { } } // ---- -// Warning: (20-147): Function state mutability can be restricted to pure +// Warning: (20-147): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/parsing/emit_without_event.sol b/test/libsolidity/syntaxTests/parsing/emit_without_event.sol index b838b4af1..39ba891f2 100644 --- a/test/libsolidity/syntaxTests/parsing/emit_without_event.sol +++ b/test/libsolidity/syntaxTests/parsing/emit_without_event.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// ParserError: (49-50): Expected '(' but got ';' +// ParserError: (49-50): Expected "(" but got ";" diff --git a/test/libsolidity/syntaxTests/parsing/empty_enum.sol b/test/libsolidity/syntaxTests/parsing/empty_enum.sol index 483f6a917..5f7f0b682 100644 --- a/test/libsolidity/syntaxTests/parsing/empty_enum.sol +++ b/test/libsolidity/syntaxTests/parsing/empty_enum.sol @@ -2,4 +2,4 @@ contract c { enum foo { } } // ---- -// ParserError: (25-26): enum with no members is not allowed. +// ParserError: (25-26): "enum" with no members is not allowed. diff --git a/test/libsolidity/syntaxTests/parsing/event_with_no_argument_list.sol b/test/libsolidity/syntaxTests/parsing/event_with_no_argument_list.sol index b38c7dc9b..a3f2e82f3 100644 --- a/test/libsolidity/syntaxTests/parsing/event_with_no_argument_list.sol +++ b/test/libsolidity/syntaxTests/parsing/event_with_no_argument_list.sol @@ -2,4 +2,4 @@ contract c { event e; } // ---- -// ParserError: (21-22): Expected '(' but got ';' +// ParserError: (21-22): Expected "(" but got ";" diff --git a/test/libsolidity/syntaxTests/parsing/exp_expression.sol b/test/libsolidity/syntaxTests/parsing/exp_expression.sol index 6b307ea07..c2fa1fda4 100644 --- a/test/libsolidity/syntaxTests/parsing/exp_expression.sol +++ b/test/libsolidity/syntaxTests/parsing/exp_expression.sol @@ -5,4 +5,4 @@ contract test { } // ---- // Warning: (61-70): Unused local variable. -// Warning: (20-86): Function state mutability can be restricted to pure +// Warning: (20-86): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/parsing/external_variable.sol b/test/libsolidity/syntaxTests/parsing/external_variable.sol index 2a02d19a7..e9e20ef5f 100644 --- a/test/libsolidity/syntaxTests/parsing/external_variable.sol +++ b/test/libsolidity/syntaxTests/parsing/external_variable.sol @@ -2,4 +2,4 @@ contract c { uint external x; } // ---- -// ParserError: (19-27): Expected identifier but got 'external' +// ParserError: (19-27): Expected identifier but got "external" diff --git a/test/libsolidity/syntaxTests/parsing/fixed_literal_with_double_radix.sol b/test/libsolidity/syntaxTests/parsing/fixed_literal_with_double_radix.sol index 0d5734aab..743210c2b 100644 --- a/test/libsolidity/syntaxTests/parsing/fixed_literal_with_double_radix.sol +++ b/test/libsolidity/syntaxTests/parsing/fixed_literal_with_double_radix.sol @@ -2,4 +2,4 @@ contract A { fixed40x40 pi = 3.14.15; } // ---- -// ParserError: (34-37): Expected ';' but got 'Number' +// ParserError: (34-37): Expected ";" but got "Number" diff --git a/test/libsolidity/syntaxTests/parsing/for_loop_simple_initexpr.sol b/test/libsolidity/syntaxTests/parsing/for_loop_simple_initexpr.sol index 9fafd706b..ff77367a4 100644 --- a/test/libsolidity/syntaxTests/parsing/for_loop_simple_initexpr.sol +++ b/test/libsolidity/syntaxTests/parsing/for_loop_simple_initexpr.sol @@ -11,4 +11,4 @@ contract test { // Warning: (144-152): Unreachable code. // Warning: (33-42): Unused function parameter. Remove or comment out the variable name to silence this warning. // Warning: (122-131): Unused local variable. -// Warning: (20-169): Function state mutability can be restricted to pure +// Warning: (20-169): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/parsing/for_loop_simple_noexpr.sol b/test/libsolidity/syntaxTests/parsing/for_loop_simple_noexpr.sol index c36f9c581..cbff57718 100644 --- a/test/libsolidity/syntaxTests/parsing/for_loop_simple_noexpr.sol +++ b/test/libsolidity/syntaxTests/parsing/for_loop_simple_noexpr.sol @@ -10,4 +10,4 @@ contract test { // Warning: (144-152): Unreachable code. // Warning: (37-46): Unused function parameter. Remove or comment out the variable name to silence this warning. // Warning: (122-131): Unused local variable. -// Warning: (24-177): Function state mutability can be restricted to pure +// Warning: (24-177): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/parsing/for_loop_single_stmt_body.sol b/test/libsolidity/syntaxTests/parsing/for_loop_single_stmt_body.sol index c6af519cd..3274f61ab 100644 --- a/test/libsolidity/syntaxTests/parsing/for_loop_single_stmt_body.sol +++ b/test/libsolidity/syntaxTests/parsing/for_loop_single_stmt_body.sol @@ -7,4 +7,4 @@ contract test { } // ---- // Warning: (33-42): Unused function parameter. Remove or comment out the variable name to silence this warning. -// Warning: (20-136): Function state mutability can be restricted to pure +// Warning: (20-136): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/parsing/for_loop_vardef_initexpr.sol b/test/libsolidity/syntaxTests/parsing/for_loop_vardef_initexpr.sol index c81f611b5..6d52b4801 100644 --- a/test/libsolidity/syntaxTests/parsing/for_loop_vardef_initexpr.sol +++ b/test/libsolidity/syntaxTests/parsing/for_loop_vardef_initexpr.sol @@ -10,4 +10,4 @@ contract test { // Warning: (130-138): Unreachable code. // Warning: (33-42): Unused function parameter. Remove or comment out the variable name to silence this warning. // Warning: (108-117): Unused local variable. -// Warning: (20-155): Function state mutability can be restricted to pure +// Warning: (20-155): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/parsing/function_type_as_storage_variable_with_modifiers.sol b/test/libsolidity/syntaxTests/parsing/function_type_as_storage_variable_with_modifiers.sol index 90a931a87..808d14d00 100644 --- a/test/libsolidity/syntaxTests/parsing/function_type_as_storage_variable_with_modifiers.sol +++ b/test/libsolidity/syntaxTests/parsing/function_type_as_storage_variable_with_modifiers.sol @@ -2,4 +2,4 @@ contract test { function (uint, uint) modifier1() returns (uint) f1; } // ---- -// ParserError: (48-49): Expected ';' but got '(' +// ParserError: (48-49): Expected ";" but got "(" diff --git a/test/libsolidity/syntaxTests/parsing/function_type_in_expression.sol b/test/libsolidity/syntaxTests/parsing/function_type_in_expression.sol index 000c20116..2970d39d3 100644 --- a/test/libsolidity/syntaxTests/parsing/function_type_in_expression.sol +++ b/test/libsolidity/syntaxTests/parsing/function_type_in_expression.sol @@ -6,4 +6,4 @@ contract test { } // ---- // Warning: (108-156): Unused local variable. -// Warning: (78-167): Function state mutability can be restricted to pure +// Warning: (78-167): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/parsing/if_statement.sol b/test/libsolidity/syntaxTests/parsing/if_statement.sol index b3269785d..e3c378dbe 100644 --- a/test/libsolidity/syntaxTests/parsing/if_statement.sol +++ b/test/libsolidity/syntaxTests/parsing/if_statement.sol @@ -5,4 +5,4 @@ contract test { } // ---- // Warning: (109-115): Unused local variable. -// Warning: (20-128): Function state mutability can be restricted to pure +// Warning: (20-128): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/parsing/local_const_variable.sol b/test/libsolidity/syntaxTests/parsing/local_const_variable.sol index 505fe0b5f..95da8ce47 100644 --- a/test/libsolidity/syntaxTests/parsing/local_const_variable.sol +++ b/test/libsolidity/syntaxTests/parsing/local_const_variable.sol @@ -6,4 +6,4 @@ contract Foo { } } // ---- -// ParserError: (67-75): Expected ';' but got 'constant' +// ParserError: (67-75): Expected ";" but got "constant" diff --git a/test/libsolidity/syntaxTests/parsing/location_specifiers_for_state_variables.sol b/test/libsolidity/syntaxTests/parsing/location_specifiers_for_state_variables.sol index 40eaf8389..7bcaaddda 100644 --- a/test/libsolidity/syntaxTests/parsing/location_specifiers_for_state_variables.sol +++ b/test/libsolidity/syntaxTests/parsing/location_specifiers_for_state_variables.sol @@ -2,4 +2,4 @@ contract Foo { uint[] memory x; } // ---- -// ParserError: (23-29): Expected identifier but got 'memory' +// ParserError: (23-29): Expected identifier but got "memory" diff --git a/test/libsolidity/syntaxTests/parsing/location_specifiers_for_state_variables_multi.sol b/test/libsolidity/syntaxTests/parsing/location_specifiers_for_state_variables_multi.sol index e34df2b22..3c24150ad 100644 --- a/test/libsolidity/syntaxTests/parsing/location_specifiers_for_state_variables_multi.sol +++ b/test/libsolidity/syntaxTests/parsing/location_specifiers_for_state_variables_multi.sol @@ -2,4 +2,4 @@ contract Foo { uint[] memory storage calldata x; } // ---- -// ParserError: (23-29): Expected identifier but got 'memory' +// ParserError: (23-29): Expected identifier but got "memory" diff --git a/test/libsolidity/syntaxTests/parsing/malformed_enum_declaration.sol b/test/libsolidity/syntaxTests/parsing/malformed_enum_declaration.sol index 811b42191..0551920c8 100644 --- a/test/libsolidity/syntaxTests/parsing/malformed_enum_declaration.sol +++ b/test/libsolidity/syntaxTests/parsing/malformed_enum_declaration.sol @@ -2,4 +2,4 @@ contract c { enum foo { WARNING,} } // ---- -// ParserError: (33-34): Expected identifier after ',' +// ParserError: (33-34): Expected identifier after ",". diff --git a/test/libsolidity/syntaxTests/parsing/mapping_from_address_payable.sol b/test/libsolidity/syntaxTests/parsing/mapping_from_address_payable.sol index 7e6f98d7c..04c854d84 100644 --- a/test/libsolidity/syntaxTests/parsing/mapping_from_address_payable.sol +++ b/test/libsolidity/syntaxTests/parsing/mapping_from_address_payable.sol @@ -2,4 +2,4 @@ contract C { mapping(address payable => uint) m; } // ---- -// ParserError: (33-40): Expected '=>' but got 'payable' +// ParserError: (33-40): Expected "=>" but got "payable" diff --git a/test/libsolidity/syntaxTests/parsing/mapping_nonelementary_key_1.sol b/test/libsolidity/syntaxTests/parsing/mapping_nonelementary_key_1.sol index ea2d282cc..870f6d18d 100644 --- a/test/libsolidity/syntaxTests/parsing/mapping_nonelementary_key_1.sol +++ b/test/libsolidity/syntaxTests/parsing/mapping_nonelementary_key_1.sol @@ -2,4 +2,4 @@ contract c { mapping(uint[] => uint) data; } // ---- -// ParserError: (26-27): Expected '=>' but got '[' +// ParserError: (26-27): Expected "=>" but got "[" diff --git a/test/libsolidity/syntaxTests/parsing/mapping_nonelementary_key_4.sol b/test/libsolidity/syntaxTests/parsing/mapping_nonelementary_key_4.sol index f4dcb00ad..ec53b4c74 100644 --- a/test/libsolidity/syntaxTests/parsing/mapping_nonelementary_key_4.sol +++ b/test/libsolidity/syntaxTests/parsing/mapping_nonelementary_key_4.sol @@ -2,4 +2,4 @@ contract c { mapping(string[] => uint) data; } // ---- -// ParserError: (28-29): Expected '=>' but got '[' +// ParserError: (28-29): Expected "=>" but got "[" diff --git a/test/libsolidity/syntaxTests/parsing/missing_parameter_name_in_named_args.sol b/test/libsolidity/syntaxTests/parsing/missing_parameter_name_in_named_args.sol index d7c2f2be2..96b238ba0 100644 --- a/test/libsolidity/syntaxTests/parsing/missing_parameter_name_in_named_args.sol +++ b/test/libsolidity/syntaxTests/parsing/missing_parameter_name_in_named_args.sol @@ -3,4 +3,4 @@ contract test { function b() returns (uint r) { r = a({: 1, : 2, : 3}); } } // ---- -// ParserError: (143-144): Expected identifier but got ':' +// ParserError: (143-144): Expected identifier but got ":" diff --git a/test/libsolidity/syntaxTests/parsing/missing_variable_name_in_declaration.sol b/test/libsolidity/syntaxTests/parsing/missing_variable_name_in_declaration.sol index 51b7bd24d..73ced3acd 100644 --- a/test/libsolidity/syntaxTests/parsing/missing_variable_name_in_declaration.sol +++ b/test/libsolidity/syntaxTests/parsing/missing_variable_name_in_declaration.sol @@ -2,4 +2,4 @@ contract test { uint256 ; } // ---- -// ParserError: (28-29): Expected identifier but got ';' +// ParserError: (28-29): Expected identifier but got ";" diff --git a/test/libsolidity/syntaxTests/parsing/modifier_without_semicolon.sol b/test/libsolidity/syntaxTests/parsing/modifier_without_semicolon.sol index a9fa33e63..c6c035513 100644 --- a/test/libsolidity/syntaxTests/parsing/modifier_without_semicolon.sol +++ b/test/libsolidity/syntaxTests/parsing/modifier_without_semicolon.sol @@ -2,4 +2,4 @@ contract c { modifier mod { if (msg.sender == 0) _ } } // ---- -// ParserError: (52-53): Expected ';' but got '}' +// ParserError: (52-53): Expected ";" but got "}" diff --git a/test/libsolidity/syntaxTests/parsing/overloaded_functions.sol b/test/libsolidity/syntaxTests/parsing/overloaded_functions.sol index fe050d1b8..f94947617 100644 --- a/test/libsolidity/syntaxTests/parsing/overloaded_functions.sol +++ b/test/libsolidity/syntaxTests/parsing/overloaded_functions.sol @@ -3,5 +3,5 @@ contract test { function fun(uint a, uint b) public returns(uint r) { return a + b; } } // ---- -// Warning: (17-74): Function state mutability can be restricted to pure -// Warning: (76-145): Function state mutability can be restricted to pure +// Warning: (17-74): Function state mutability can be restricted to "pure". +// Warning: (76-145): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/parsing/payable_without_arguments.sol b/test/libsolidity/syntaxTests/parsing/payable_without_arguments.sol index b9486f596..d53f36e8d 100644 --- a/test/libsolidity/syntaxTests/parsing/payable_without_arguments.sol +++ b/test/libsolidity/syntaxTests/parsing/payable_without_arguments.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// ParserError: (70-71): Expected '(' but got ';' +// ParserError: (70-71): Expected "(" but got ";" diff --git a/test/libsolidity/syntaxTests/parsing/placeholder_in_function_context.sol b/test/libsolidity/syntaxTests/parsing/placeholder_in_function_context.sol index a50855c0d..b35a1852a 100644 --- a/test/libsolidity/syntaxTests/parsing/placeholder_in_function_context.sol +++ b/test/libsolidity/syntaxTests/parsing/placeholder_in_function_context.sol @@ -5,4 +5,4 @@ contract c { } } // ---- -// Warning: (17-105): Function state mutability can be restricted to pure +// Warning: (17-105): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/parsing/trailing_dot1.sol b/test/libsolidity/syntaxTests/parsing/trailing_dot1.sol index d91c385a6..f44bb8735 100644 --- a/test/libsolidity/syntaxTests/parsing/trailing_dot1.sol +++ b/test/libsolidity/syntaxTests/parsing/trailing_dot1.sol @@ -4,4 +4,4 @@ contract test { uint256 c = 4.e-2; } // ---- -// TypeError: (70-73): Member "e" not found or not visible after argument-dependent lookup in int_const 4. +// TypeError: (70-73): Member "e" not found or not visible after argument-dependent lookup in "int_const 4". diff --git a/test/libsolidity/syntaxTests/parsing/trailing_dot2.sol b/test/libsolidity/syntaxTests/parsing/trailing_dot2.sol index 38a7ab2d6..7f8696f7f 100644 --- a/test/libsolidity/syntaxTests/parsing/trailing_dot2.sol +++ b/test/libsolidity/syntaxTests/parsing/trailing_dot2.sol @@ -4,4 +4,4 @@ contract test { uint256 c = 2 + 2.; } // ---- -// ParserError: (76-77): Expected identifier but got ';' +// ParserError: (76-77): Expected identifier but got ";" diff --git a/test/libsolidity/syntaxTests/parsing/tuples_decl_without_rhs.sol b/test/libsolidity/syntaxTests/parsing/tuples_decl_without_rhs.sol index dba3e7acc..40650f715 100644 --- a/test/libsolidity/syntaxTests/parsing/tuples_decl_without_rhs.sol +++ b/test/libsolidity/syntaxTests/parsing/tuples_decl_without_rhs.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// ParserError: (76-77): Expected '=' but got ';' +// ParserError: (76-77): Expected "=" but got ";" diff --git a/test/libsolidity/syntaxTests/parsing/tuples_without_commas.sol b/test/libsolidity/syntaxTests/parsing/tuples_without_commas.sol index fcbb875c5..dcfa8a342 100644 --- a/test/libsolidity/syntaxTests/parsing/tuples_without_commas.sol +++ b/test/libsolidity/syntaxTests/parsing/tuples_without_commas.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// ParserError: (42-43): Expected ',' but got 'Number' +// ParserError: (42-43): Expected "," but got "Number" diff --git a/test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol b/test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol index f2542d907..3b4bbf306 100644 --- a/test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol +++ b/test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol @@ -5,5 +5,5 @@ contract test { } } // ---- -// SyntaxError: (70-72): Use of unary + is disallowed. -// TypeError: (70-72): Unary operator + cannot be applied to type uint256 +// SyntaxError: (70-72): Use of unary "+" is disallowed. +// TypeError: (70-72): Unary operator "+" cannot be applied to type "uint256". diff --git a/test/libsolidity/syntaxTests/parsing/var_array.sol b/test/libsolidity/syntaxTests/parsing/var_array.sol index e08f55117..17e915163 100644 --- a/test/libsolidity/syntaxTests/parsing/var_array.sol +++ b/test/libsolidity/syntaxTests/parsing/var_array.sol @@ -2,4 +2,4 @@ contract Foo { function f() { var[] a; } } // ---- -// ParserError: (34-35): Expected identifier but got '[' +// ParserError: (34-35): Expected identifier but got "[" diff --git a/test/libsolidity/syntaxTests/pragma/invalid_pragma.sol b/test/libsolidity/syntaxTests/pragma/invalid_pragma.sol index cb2585baf..b0910580e 100644 --- a/test/libsolidity/syntaxTests/pragma/invalid_pragma.sol +++ b/test/libsolidity/syntaxTests/pragma/invalid_pragma.sol @@ -1,3 +1,3 @@ pragma 0; // ---- -// SyntaxError: (0-9): Invalid pragma "0" +// SyntaxError: (0-9): Invalid pragma "0". diff --git a/test/libsolidity/syntaxTests/pragma/unknown_pragma.sol b/test/libsolidity/syntaxTests/pragma/unknown_pragma.sol index 3a48edddf..de053d67f 100644 --- a/test/libsolidity/syntaxTests/pragma/unknown_pragma.sol +++ b/test/libsolidity/syntaxTests/pragma/unknown_pragma.sol @@ -1,3 +1,3 @@ pragma thisdoesntexist; // ---- -// SyntaxError: (0-23): Unknown pragma "thisdoesntexist" +// SyntaxError: (0-23): Unknown pragma "thisdoesntexist" . diff --git a/test/libsolidity/syntaxTests/receiveEther/default_visibility.sol b/test/libsolidity/syntaxTests/receiveEther/default_visibility.sol index ec644a453..e5de30d16 100644 --- a/test/libsolidity/syntaxTests/receiveEther/default_visibility.sol +++ b/test/libsolidity/syntaxTests/receiveEther/default_visibility.sol @@ -4,5 +4,5 @@ contract C { } // ---- // SyntaxError: (95-107): No visibility specified. Did you intend to add "external"? -// TypeError: (95-107): Receive ether function must be payable, but is "nonpayable". +// TypeError: (95-107): Receive ether function must be "payable" but is "nonpayable". // TypeError: (95-107): Receive ether function must be defined as "external". diff --git a/test/libsolidity/syntaxTests/receiveEther/pure_modifier.sol b/test/libsolidity/syntaxTests/receiveEther/pure_modifier.sol index 4cdaa2e18..e9ed1bc22 100644 --- a/test/libsolidity/syntaxTests/receiveEther/pure_modifier.sol +++ b/test/libsolidity/syntaxTests/receiveEther/pure_modifier.sol @@ -3,4 +3,4 @@ contract C { receive() external pure { x = 2; } } // ---- -// TypeError: (29-63): Receive ether function must be payable, but is "pure". +// TypeError: (29-63): Receive ether function must be "payable" but is "pure". diff --git a/test/libsolidity/syntaxTests/receiveEther/return_value.sol b/test/libsolidity/syntaxTests/receiveEther/return_value.sol index 0a3cd8b13..d34aea0f1 100644 --- a/test/libsolidity/syntaxTests/receiveEther/return_value.sol +++ b/test/libsolidity/syntaxTests/receiveEther/return_value.sol @@ -2,5 +2,5 @@ contract C { receive() external returns (uint256) {} } // ---- -// TypeError: (17-56): Receive ether function must be payable, but is "nonpayable". +// TypeError: (17-56): Receive ether function must be "payable" but is "nonpayable". // TypeError: (44-53): Receive ether function cannot return values. diff --git a/test/libsolidity/syntaxTests/receiveEther/view_modifier.sol b/test/libsolidity/syntaxTests/receiveEther/view_modifier.sol index 5f5b6a117..67fb25383 100644 --- a/test/libsolidity/syntaxTests/receiveEther/view_modifier.sol +++ b/test/libsolidity/syntaxTests/receiveEther/view_modifier.sol @@ -3,4 +3,4 @@ contract C { receive() external view { x = 2; } } // ---- -// TypeError: (29-63): Receive ether function must be payable, but is "view". +// TypeError: (29-63): Receive ether function must be "payable" but is "view". diff --git a/test/libsolidity/syntaxTests/returnExpressions/single_return_mismatching_type.sol b/test/libsolidity/syntaxTests/returnExpressions/single_return_mismatching_type.sol index 0a9b993ee..03ec8ac48 100644 --- a/test/libsolidity/syntaxTests/returnExpressions/single_return_mismatching_type.sol +++ b/test/libsolidity/syntaxTests/returnExpressions/single_return_mismatching_type.sol @@ -6,4 +6,4 @@ contract C } } // ---- -// TypeError: (78-86): Return argument type literal_string "string" is not implicitly convertible to expected type (type of first return variable) uint256. +// TypeError: (78-86): Return argument type "literal_string "string"" is not implicitly convertible to expected type (type of first return variable) "uint256". diff --git a/test/libsolidity/syntaxTests/smoke_test.sol b/test/libsolidity/syntaxTests/smoke_test.sol index 6abaff183..d6b83b9df 100644 --- a/test/libsolidity/syntaxTests/smoke_test.sol +++ b/test/libsolidity/syntaxTests/smoke_test.sol @@ -3,4 +3,4 @@ contract test { function fun(uint256 arg1) public { uint256 y; y = arg1; } } // ---- -// Warning: (42-100): Function state mutability can be restricted to pure +// Warning: (42-100): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_calldata.sol b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_calldata.sol index 28d2f2e75..6964b0b89 100644 --- a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_calldata.sol +++ b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_calldata.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// ParserError: (121-129): Expected ',' but got 'calldata' +// ParserError: (121-129): Expected "," but got "calldata" diff --git a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_invalid_arg_type.sol b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_invalid_arg_type.sol index ed1f07402..3748920a5 100644 --- a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_invalid_arg_type.sol +++ b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_invalid_arg_type.sol @@ -4,5 +4,5 @@ contract C { } } // ---- -// TypeError: (57-61): The first argument to "abi.decode" must be implicitly convertible to bytes memory or bytes calldata, but is of type type(uint256). +// TypeError: (57-61): The first argument to "abi.decode" must be implicitly convertible to "bytes memory" or "bytes calldata", but is of type "type(uint256)". // TypeError: (63-67): The second argument to "abi.decode" has to be a tuple of types. diff --git a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_memory.sol b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_memory.sol index e4667e34d..2935327bc 100644 --- a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_memory.sol +++ b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_memory.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// ParserError: (71-77): Expected ',' but got 'memory' +// ParserError: (71-77): Expected "," but got "memory" diff --git a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_storage.sol b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_storage.sol index d9910b64c..2848bd18b 100644 --- a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_storage.sol +++ b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_storage.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// ParserError: (109-116): Expected ',' but got 'storage' +// ParserError: (109-116): Expected "," but got "storage" diff --git a/test/libsolidity/syntaxTests/specialFunctions/single_non_bytes_arg.sol b/test/libsolidity/syntaxTests/specialFunctions/single_non_bytes_arg.sol index c17d08497..c3084c3d0 100644 --- a/test/libsolidity/syntaxTests/specialFunctions/single_non_bytes_arg.sol +++ b/test/libsolidity/syntaxTests/specialFunctions/single_non_bytes_arg.sol @@ -7,6 +7,6 @@ contract C { function g(bytes32) pure internal {} } // ---- -// TypeError: (64-71): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. -// TypeError: (92-99): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. -// TypeError: (123-130): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. +// TypeError: (64-71): Invalid type for argument in function call. Invalid implicit conversion from "uint256" to "bytes memory" requested. This function requires a single "bytes" argument. Use "abi.encodePacked(...)" to obtain the pre-0.5.0 behaviour or "abi.encode(...)" to use ABI encoding. +// TypeError: (92-99): Invalid type for argument in function call. Invalid implicit conversion from "uint256" to "bytes memory" requested. This function requires a single "bytes" argument. Use "abi.encodePacked(...)" to obtain the pre-0.5.0 behaviour or "abi.encode(...)" to use ABI encoding. +// TypeError: (123-130): Invalid type for argument in function call. Invalid implicit conversion from "uint256" to "bytes memory" requested. This function requires a single "bytes" argument. Use "abi.encodePacked(...)" to obtain the pre-0.5.0 behaviour or "abi.encode(...)" to use ABI encoding. diff --git a/test/libsolidity/syntaxTests/string/string_multipart_newline_without_hex_prefix.sol b/test/libsolidity/syntaxTests/string/string_multipart_newline_without_hex_prefix.sol index 613b86da6..75adc6fd4 100644 --- a/test/libsolidity/syntaxTests/string/string_multipart_newline_without_hex_prefix.sol +++ b/test/libsolidity/syntaxTests/string/string_multipart_newline_without_hex_prefix.sol @@ -7,4 +7,4 @@ contract test { } } // ---- -// ParserError: (118-124): Expected ';' but got 'StringLiteral' \ No newline at end of file +// ParserError: (118-124): Expected ";" but got "StringLiteral" diff --git a/test/libsolidity/syntaxTests/string/string_multipart_only_hex.sol b/test/libsolidity/syntaxTests/string/string_multipart_only_hex.sol index d748104f2..8f22b4ad1 100644 --- a/test/libsolidity/syntaxTests/string/string_multipart_only_hex.sol +++ b/test/libsolidity/syntaxTests/string/string_multipart_only_hex.sol @@ -5,4 +5,4 @@ contract test { } } // ---- -// ParserError: (116-120): Expected ';' but got 'StringLiteral' +// ParserError: (116-120): Expected ";" but got "StringLiteral" diff --git a/test/libsolidity/syntaxTests/string/string_multipart_only_regular.sol b/test/libsolidity/syntaxTests/string/string_multipart_only_regular.sol index b420601f5..f1193d563 100644 --- a/test/libsolidity/syntaxTests/string/string_multipart_only_regular.sol +++ b/test/libsolidity/syntaxTests/string/string_multipart_only_regular.sol @@ -5,4 +5,4 @@ contract test { } } // ---- -// ParserError: (112-119): Expected ';' but got 'HexStringLiteral' +// ParserError: (112-119): Expected ";" but got "HexStringLiteral" diff --git a/test/libsolidity/syntaxTests/structs/address_member_access.sol b/test/libsolidity/syntaxTests/structs/address_member_access.sol index cf5170bf4..e18d9a431 100644 --- a/test/libsolidity/syntaxTests/structs/address_member_access.sol +++ b/test/libsolidity/syntaxTests/structs/address_member_access.sol @@ -6,4 +6,4 @@ contract C { } } // ---- -// TypeError: (129-138): Member "address" not found or not visible after argument-dependent lookup in struct C.S memory. +// TypeError: (129-138): Member "address" not found or not visible after argument-dependent lookup in "struct C.S memory". diff --git a/test/libsolidity/syntaxTests/structs/address_member_declaration.sol b/test/libsolidity/syntaxTests/structs/address_member_declaration.sol index 2e654187b..4f6af21f3 100644 --- a/test/libsolidity/syntaxTests/structs/address_member_declaration.sol +++ b/test/libsolidity/syntaxTests/structs/address_member_declaration.sol @@ -2,4 +2,4 @@ contract C { struct S { uint address; } } // ---- -// ParserError: (33-40): Expected identifier but got 'address' +// ParserError: (33-40): Expected identifier but got "address" diff --git a/test/libsolidity/syntaxTests/structs/memory_to_calldata.sol b/test/libsolidity/syntaxTests/structs/memory_to_calldata.sol index 2e4d89767..ffa0aeaea 100644 --- a/test/libsolidity/syntaxTests/structs/memory_to_calldata.sol +++ b/test/libsolidity/syntaxTests/structs/memory_to_calldata.sol @@ -6,6 +6,6 @@ contract Test { } // ---- // TypeError: (114-115): External function arguments of reference type are read-only. -// TypeError: (118-122): Type struct Test.S memory is not implicitly convertible to expected type struct Test.S calldata. +// TypeError: (118-122): Type "struct Test.S memory" is not implicitly convertible to expected type "struct Test.S calldata". // TypeError: (178-179): External function arguments of reference type are read-only. -// TypeError: (182-183): Type struct Test.S memory is not implicitly convertible to expected type struct Test.S calldata. +// TypeError: (182-183): Type "struct Test.S memory" is not implicitly convertible to expected type "struct Test.S calldata". diff --git a/test/libsolidity/syntaxTests/tryCatch/error_with_wrong_type.sol b/test/libsolidity/syntaxTests/tryCatch/error_with_wrong_type.sol index 05878ba5b..720cb0f96 100644 --- a/test/libsolidity/syntaxTests/tryCatch/error_with_wrong_type.sol +++ b/test/libsolidity/syntaxTests/tryCatch/error_with_wrong_type.sol @@ -9,4 +9,4 @@ contract C { // ==== // EVMVersion: >=byzantium // ---- -// TypeError: (94-123): Expected `catch Error(string memory ...) { ... }`. +// TypeError: (94-123): Expected "catch Error(string memory ...) { ... }". diff --git a/test/libsolidity/syntaxTests/tryCatch/invalid_returns.sol b/test/libsolidity/syntaxTests/tryCatch/invalid_returns.sol index e1d22f05f..97d481a0f 100644 --- a/test/libsolidity/syntaxTests/tryCatch/invalid_returns.sol +++ b/test/libsolidity/syntaxTests/tryCatch/invalid_returns.sol @@ -9,5 +9,5 @@ contract C { } } // ---- -// TypeError: (157-161): Invalid type, expected uint8 but got uint256. -// TypeError: (163-168): Invalid type, expected uint256 but got int256. +// TypeError: (157-161): Invalid type, expected "uint8" but got "uint256". +// TypeError: (163-168): Invalid type, expected "uint256" but got "int256". diff --git a/test/libsolidity/syntaxTests/tryCatch/low_level_pre-byzantium.sol b/test/libsolidity/syntaxTests/tryCatch/low_level_pre-byzantium.sol index 3dd16df11..ad6f05bb0 100644 --- a/test/libsolidity/syntaxTests/tryCatch/low_level_pre-byzantium.sol +++ b/test/libsolidity/syntaxTests/tryCatch/low_level_pre-byzantium.sol @@ -10,4 +10,4 @@ contract C { // ==== // EVMVersion: =byzantium // ---- -// TypeError: (94-118): Expected `catch (bytes memory ...) { ... }` or `catch { ... }`. +// TypeError: (94-118): Expected "catch (bytes memory ...) { ... }" or "catch { ... }". diff --git a/test/libsolidity/syntaxTests/tryCatch/no_catch.sol b/test/libsolidity/syntaxTests/tryCatch/no_catch.sol index 28938d3dd..b229e6907 100644 --- a/test/libsolidity/syntaxTests/tryCatch/no_catch.sol +++ b/test/libsolidity/syntaxTests/tryCatch/no_catch.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// ParserError: (97-98): Expected reserved keyword 'catch' but got '}' +// ParserError: (97-98): Expected reserved keyword "catch" but got "}" diff --git a/test/libsolidity/syntaxTests/tryCatch/structured_pre_byzantium.sol b/test/libsolidity/syntaxTests/tryCatch/structured_pre_byzantium.sol index 34c7e5011..b74dd15ab 100644 --- a/test/libsolidity/syntaxTests/tryCatch/structured_pre_byzantium.sol +++ b/test/libsolidity/syntaxTests/tryCatch/structured_pre_byzantium.sol @@ -10,4 +10,4 @@ contract C { // ==== // EVMVersion: not compatible with types bool and bool -// TypeError: (250-255): Operator < not compatible with types bool and bool -// TypeError: (269-275): Operator >= not compatible with types bool and bool -// TypeError: (289-295): Operator <= not compatible with types bool and bool -// TypeError: (309-314): Operator & not compatible with types bool and bool -// TypeError: (328-333): Operator | not compatible with types bool and bool -// TypeError: (347-352): Operator ^ not compatible with types bool and bool -// TypeError: (366-368): Unary operator ~ cannot be applied to type bool -// TypeError: (382-384): Unary operator ~ cannot be applied to type bool -// TypeError: (398-403): Operator + not compatible with types bool and bool -// TypeError: (417-422): Operator - not compatible with types bool and bool -// TypeError: (436-438): Unary operator - cannot be applied to type bool -// TypeError: (452-454): Unary operator - cannot be applied to type bool -// TypeError: (468-473): Operator * not compatible with types bool and bool -// TypeError: (487-492): Operator / not compatible with types bool and bool -// TypeError: (506-512): Operator ** not compatible with types bool and bool -// TypeError: (526-531): Operator % not compatible with types bool and bool -// TypeError: (545-551): Operator << not compatible with types bool and bool -// TypeError: (565-571): Operator >> not compatible with types bool and bool +// TypeError: (231-236): Operator ">" not compatible with types "bool" and "bool". +// TypeError: (250-255): Operator "<" not compatible with types "bool" and "bool". +// TypeError: (269-275): Operator ">=" not compatible with types "bool" and "bool". +// TypeError: (289-295): Operator "<=" not compatible with types "bool" and "bool". +// TypeError: (309-314): Operator "&" not compatible with types "bool" and "bool". +// TypeError: (328-333): Operator "|" not compatible with types "bool" and "bool". +// TypeError: (347-352): Operator "^" not compatible with types "bool" and "bool". +// TypeError: (366-368): Unary operator "~" cannot be applied to type "bool". +// TypeError: (382-384): Unary operator "~" cannot be applied to type "bool". +// TypeError: (398-403): Operator "+" not compatible with types "bool" and "bool". +// TypeError: (417-422): Operator "-" not compatible with types "bool" and "bool". +// TypeError: (436-438): Unary operator "-" cannot be applied to type "bool". +// TypeError: (452-454): Unary operator "-" cannot be applied to type "bool". +// TypeError: (468-473): Operator "*" not compatible with types "bool" and "bool". +// TypeError: (487-492): Operator "/" not compatible with types "bool" and "bool". +// TypeError: (506-512): Operator "**" not compatible with types "bool" and "bool". +// TypeError: (526-531): Operator "%" not compatible with types "bool" and "bool". +// TypeError: (545-551): Operator "<<" not compatible with types "bool" and "bool". +// TypeError: (565-571): Operator ">>" not compatible with types "bool" and "bool". diff --git a/test/libsolidity/syntaxTests/types/decimal_literal_to_bytesXX_implicit.sol b/test/libsolidity/syntaxTests/types/decimal_literal_to_bytesXX_implicit.sol index e472c43b2..a5ad90582 100644 --- a/test/libsolidity/syntaxTests/types/decimal_literal_to_bytesXX_implicit.sol +++ b/test/libsolidity/syntaxTests/types/decimal_literal_to_bytesXX_implicit.sol @@ -12,12 +12,12 @@ contract C { } } // ---- -// TypeError: (48-61): Type int_const 1 is not implicitly convertible to expected type bytes1. -// TypeError: (68-81): Type int_const 1 is not implicitly convertible to expected type bytes2. -// TypeError: (88-103): Type int_const 256 is not implicitly convertible to expected type bytes2. -// TypeError: (110-123): Type int_const 1 is not implicitly convertible to expected type bytes3. -// TypeError: (130-147): Type int_const 65536 is not implicitly convertible to expected type bytes3. -// TypeError: (154-167): Type int_const 1 is not implicitly convertible to expected type bytes4. -// TypeError: (174-194): Type int_const 16777216 is not implicitly convertible to expected type bytes4. -// TypeError: (201-215): Type int_const 1 is not implicitly convertible to expected type bytes16. -// TypeError: (222-236): Type int_const 1 is not implicitly convertible to expected type bytes32. +// TypeError: (48-61): Type "int_const 1" is not implicitly convertible to expected type "bytes1". +// TypeError: (68-81): Type "int_const 1" is not implicitly convertible to expected type "bytes2". +// TypeError: (88-103): Type "int_const 256" is not implicitly convertible to expected type "bytes2". +// TypeError: (110-123): Type "int_const 1" is not implicitly convertible to expected type "bytes3". +// TypeError: (130-147): Type "int_const 65536" is not implicitly convertible to expected type "bytes3". +// TypeError: (154-167): Type "int_const 1" is not implicitly convertible to expected type "bytes4". +// TypeError: (174-194): Type "int_const 16777216" is not implicitly convertible to expected type "bytes4". +// TypeError: (201-215): Type "int_const 1" is not implicitly convertible to expected type "bytes16". +// TypeError: (222-236): Type "int_const 1" is not implicitly convertible to expected type "bytes32". diff --git a/test/libsolidity/syntaxTests/types/empty_tuple_lvalue.sol b/test/libsolidity/syntaxTests/types/empty_tuple_lvalue.sol index 63b039cd8..b0bc1e6d3 100644 --- a/test/libsolidity/syntaxTests/types/empty_tuple_lvalue.sol +++ b/test/libsolidity/syntaxTests/types/empty_tuple_lvalue.sol @@ -9,4 +9,4 @@ contract C { // ---- // TypeError: (122-125): Tuple component cannot be empty. // TypeError: (127-130): Tuple component cannot be empty. -// TypeError: (121-131): Type tuple(tuple(),tuple()) is not implicitly convertible to expected type tuple(uint256,uint256). +// TypeError: (121-131): Type "tuple(tuple(),tuple())" is not implicitly convertible to expected type "tuple(uint256,uint256)". diff --git a/test/libsolidity/syntaxTests/types/function_call_fail.sol b/test/libsolidity/syntaxTests/types/function_call_fail.sol index ef52ab448..97c2d6e4b 100644 --- a/test/libsolidity/syntaxTests/types/function_call_fail.sol +++ b/test/libsolidity/syntaxTests/types/function_call_fail.sol @@ -6,4 +6,4 @@ contract C { // ---- // TypeError: (59-63): Type is not callable // TypeError: (59-63): Expression has to be an lvalue. -// TypeError: (67-68): Type int_const 2 is not implicitly convertible to expected type tuple(). +// TypeError: (67-68): Type "int_const 2" is not implicitly convertible to expected type "tuple()". diff --git a/test/libsolidity/syntaxTests/types/function_types/function_parameter_return_types_fail.sol b/test/libsolidity/syntaxTests/types/function_types/function_parameter_return_types_fail.sol index c722ed814..aaf427a03 100644 --- a/test/libsolidity/syntaxTests/types/function_types/function_parameter_return_types_fail.sol +++ b/test/libsolidity/syntaxTests/types/function_types/function_parameter_return_types_fail.sol @@ -33,10 +33,10 @@ abstract contract Test } } // ---- -// TypeError: (1229-1322): Type function (uint256) pure returns (string memory) is not implicitly convertible to expected type function (uint256) pure returns (uint256). -// TypeError: (1330-1436): Type function (uint256) pure returns (string storage pointer) is not implicitly convertible to expected type function (uint256) pure returns (string memory). -// TypeError: (1444-1542): Type function (uint256) pure returns (string memory) is not implicitly convertible to expected type function (string memory) pure returns (uint256). -// TypeError: (1550-1657): Type function (uint256) pure returns (string memory) is not implicitly convertible to expected type function (string memory) pure returns (string memory). -// TypeError: (1666-1777): Type function (uint256) pure returns (uint256) is not implicitly convertible to expected type function (uint256,uint256) pure returns (uint256). -// TypeError: (1785-1904): Type function (string memory) pure returns (string memory) is not implicitly convertible to expected type function (string memory,uint256) pure returns (string memory). -// TypeError: (1912-2036): Type function (string memory) pure returns (string memory) is not implicitly convertible to expected type function (string memory,string memory) pure returns (string memory). +// TypeError: (1229-1322): Type "function (uint256) pure returns (string memory)" is not implicitly convertible to expected type "function (uint256) pure returns (uint256)". +// TypeError: (1330-1436): Type "function (uint256) pure returns (string storage pointer)" is not implicitly convertible to expected type "function (uint256) pure returns (string memory)". +// TypeError: (1444-1542): Type "function (uint256) pure returns (string memory)" is not implicitly convertible to expected type "function (string memory) pure returns (uint256)". +// TypeError: (1550-1657): Type "function (uint256) pure returns (string memory)" is not implicitly convertible to expected type "function (string memory) pure returns (string memory)". +// TypeError: (1666-1777): Type "function (uint256) pure returns (uint256)" is not implicitly convertible to expected type "function (uint256,uint256) pure returns (uint256)". +// TypeError: (1785-1904): Type "function (string memory) pure returns (string memory)" is not implicitly convertible to expected type "function (string memory,uint256) pure returns (string memory)". +// TypeError: (1912-2036): Type "function (string memory) pure returns (string memory)" is not implicitly convertible to expected type "function (string memory,string memory) pure returns (string memory)". diff --git a/test/libsolidity/syntaxTests/types/function_types/function_state_mutability_fail.sol b/test/libsolidity/syntaxTests/types/function_types/function_state_mutability_fail.sol index 818d78406..650cdab50 100644 --- a/test/libsolidity/syntaxTests/types/function_types/function_state_mutability_fail.sol +++ b/test/libsolidity/syntaxTests/types/function_types/function_state_mutability_fail.sol @@ -38,14 +38,14 @@ contract Test } } // ---- -// TypeError: (1580-1596): Invalid type for argument in function call. Invalid implicit conversion from function (uint256) view returns (uint256) to function (uint256) pure returns (uint256) requested. -// TypeError: (1653-1672): Invalid type for argument in function call. Invalid implicit conversion from function (uint256) returns (uint256) to function (uint256) pure returns (uint256) requested. -// TypeError: (1733-1752): Invalid type for argument in function call. Invalid implicit conversion from function (uint256) returns (uint256) to function (uint256) view returns (uint256) requested. -// TypeError: (1813-1834): Invalid type for argument in function call. Invalid implicit conversion from function (uint256) view external returns (uint256) to function (uint256) pure external returns (uint256) requested. -// TypeError: (1891-1915): Invalid type for argument in function call. Invalid implicit conversion from function (uint256) payable external returns (uint256) to function (uint256) pure external returns (uint256) requested. -// TypeError: (1975-1999): Invalid type for argument in function call. Invalid implicit conversion from function (uint256) external returns (uint256) to function (uint256) pure external returns (uint256) requested. -// TypeError: (2060-2084): Invalid type for argument in function call. Invalid implicit conversion from function (uint256) payable external returns (uint256) to function (uint256) view external returns (uint256) requested. -// TypeError: (2144-2168): Invalid type for argument in function call. Invalid implicit conversion from function (uint256) external returns (uint256) to function (uint256) view external returns (uint256) requested. -// TypeError: (2232-2253): Invalid type for argument in function call. Invalid implicit conversion from function (uint256) pure external returns (uint256) to function (uint256) payable external returns (uint256) requested. -// TypeError: (2316-2337): Invalid type for argument in function call. Invalid implicit conversion from function (uint256) view external returns (uint256) to function (uint256) payable external returns (uint256) requested. -// TypeError: (2400-2424): Invalid type for argument in function call. Invalid implicit conversion from function (uint256) external returns (uint256) to function (uint256) payable external returns (uint256) requested. +// TypeError: (1580-1596): Invalid type for argument in function call. Invalid implicit conversion from "function (uint256) view returns (uint256)" to "function (uint256) pure returns (uint256)" requested. +// TypeError: (1653-1672): Invalid type for argument in function call. Invalid implicit conversion from "function (uint256) returns (uint256)" to "function (uint256) pure returns (uint256)" requested. +// TypeError: (1733-1752): Invalid type for argument in function call. Invalid implicit conversion from "function (uint256) returns (uint256)" to "function (uint256) view returns (uint256)" requested. +// TypeError: (1813-1834): Invalid type for argument in function call. Invalid implicit conversion from "function (uint256) view external returns (uint256)" to "function (uint256) pure external returns (uint256)" requested. +// TypeError: (1891-1915): Invalid type for argument in function call. Invalid implicit conversion from "function (uint256) payable external returns (uint256)" to "function (uint256) pure external returns (uint256)" requested. +// TypeError: (1975-1999): Invalid type for argument in function call. Invalid implicit conversion from "function (uint256) external returns (uint256)" to "function (uint256) pure external returns (uint256)" requested. +// TypeError: (2060-2084): Invalid type for argument in function call. Invalid implicit conversion from "function (uint256) payable external returns (uint256)" to "function (uint256) view external returns (uint256)" requested. +// TypeError: (2144-2168): Invalid type for argument in function call. Invalid implicit conversion from "function (uint256) external returns (uint256)" to "function (uint256) view external returns (uint256)" requested. +// TypeError: (2232-2253): Invalid type for argument in function call. Invalid implicit conversion from "function (uint256) pure external returns (uint256)" to "function (uint256) payable external returns (uint256)" requested. +// TypeError: (2316-2337): Invalid type for argument in function call. Invalid implicit conversion from "function (uint256) view external returns (uint256)" to "function (uint256) payable external returns (uint256)" requested. +// TypeError: (2400-2424): Invalid type for argument in function call. Invalid implicit conversion from "function (uint256) external returns (uint256)" to "function (uint256) payable external returns (uint256)" requested. diff --git a/test/libsolidity/syntaxTests/types/hex_literal_to_bytesXX_different_size_implicit.sol b/test/libsolidity/syntaxTests/types/hex_literal_to_bytesXX_different_size_implicit.sol index 44ed93184..e639de3df 100644 --- a/test/libsolidity/syntaxTests/types/hex_literal_to_bytesXX_different_size_implicit.sol +++ b/test/libsolidity/syntaxTests/types/hex_literal_to_bytesXX_different_size_implicit.sol @@ -16,16 +16,16 @@ contract C { } } // ---- -// TypeError: (48-63): Type int_const 1 is not implicitly convertible to expected type bytes1. -// TypeError: (70-87): Type int_const 256 is not implicitly convertible to expected type bytes1. -// TypeError: (94-110): Type int_const 255 is not implicitly convertible to expected type bytes2. -// TypeError: (117-134): Type int_const 256 is not implicitly convertible to expected type bytes2. -// TypeError: (141-160): Type int_const 65536 is not implicitly convertible to expected type bytes2. -// TypeError: (167-185): Type int_const 65535 is not implicitly convertible to expected type bytes3. -// TypeError: (192-211): Type int_const 65536 is not implicitly convertible to expected type bytes3. -// TypeError: (218-239): Type int_const 16777216 is not implicitly convertible to expected type bytes3. -// TypeError: (246-266): Type int_const 16777215 is not implicitly convertible to expected type bytes4. -// TypeError: (273-295): Type int_const 16777216 is not implicitly convertible to expected type bytes4. -// TypeError: (302-326): Type int_const 4294967296 is not implicitly convertible to expected type bytes4. -// TypeError: (333-350): Type int_const 1 is not implicitly convertible to expected type bytes16. -// TypeError: (357-374): Type int_const 1 is not implicitly convertible to expected type bytes32. +// TypeError: (48-63): Type "int_const 1" is not implicitly convertible to expected type "bytes1". +// TypeError: (70-87): Type "int_const 256" is not implicitly convertible to expected type "bytes1". +// TypeError: (94-110): Type "int_const 255" is not implicitly convertible to expected type "bytes2". +// TypeError: (117-134): Type "int_const 256" is not implicitly convertible to expected type "bytes2". +// TypeError: (141-160): Type "int_const 65536" is not implicitly convertible to expected type "bytes2". +// TypeError: (167-185): Type "int_const 65535" is not implicitly convertible to expected type "bytes3". +// TypeError: (192-211): Type "int_const 65536" is not implicitly convertible to expected type "bytes3". +// TypeError: (218-239): Type "int_const 16777216" is not implicitly convertible to expected type "bytes3". +// TypeError: (246-266): Type "int_const 16777215" is not implicitly convertible to expected type "bytes4". +// TypeError: (273-295): Type "int_const 16777216" is not implicitly convertible to expected type "bytes4". +// TypeError: (302-326): Type "int_const 4294967296" is not implicitly convertible to expected type "bytes4". +// TypeError: (333-350): Type "int_const 1" is not implicitly convertible to expected type "bytes16". +// TypeError: (357-374): Type "int_const 1" is not implicitly convertible to expected type "bytes32". diff --git a/test/libsolidity/syntaxTests/types/library_function_selector_internal.sol b/test/libsolidity/syntaxTests/types/library_function_selector_internal.sol index 8f155867e..10f1cc4dc 100644 --- a/test/libsolidity/syntaxTests/types/library_function_selector_internal.sol +++ b/test/libsolidity/syntaxTests/types/library_function_selector_internal.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// TypeError: (126-138): Member "selector" not found or not visible after argument-dependent lookup in function (uint256). +// TypeError: (126-138): Member "selector" not found or not visible after argument-dependent lookup in "function (uint256)". diff --git a/test/libsolidity/syntaxTests/types/library_function_selector_private_inside.sol b/test/libsolidity/syntaxTests/types/library_function_selector_private_inside.sol index 825953196..36b4b4459 100644 --- a/test/libsolidity/syntaxTests/types/library_function_selector_private_inside.sol +++ b/test/libsolidity/syntaxTests/types/library_function_selector_private_inside.sol @@ -5,4 +5,4 @@ library L { } } // ---- -// TypeError: (113-123): Member "selector" not found or not visible after argument-dependent lookup in function (uint256). +// TypeError: (113-123): Member "selector" not found or not visible after argument-dependent lookup in "function (uint256)". diff --git a/test/libsolidity/syntaxTests/types/library_function_selector_private_outside.sol b/test/libsolidity/syntaxTests/types/library_function_selector_private_outside.sol index b5785f88f..f1f3c43ea 100644 --- a/test/libsolidity/syntaxTests/types/library_function_selector_private_outside.sol +++ b/test/libsolidity/syntaxTests/types/library_function_selector_private_outside.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// TypeError: (125-128): Member "f" not found or not visible after argument-dependent lookup in type(library L). +// TypeError: (125-128): Member "f" not found or not visible after argument-dependent lookup in "type(library L)". diff --git a/test/libsolidity/syntaxTests/types/library_to_address_payable.sol b/test/libsolidity/syntaxTests/types/library_to_address_payable.sol index 36a7a8968..11d699d77 100644 --- a/test/libsolidity/syntaxTests/types/library_to_address_payable.sol +++ b/test/libsolidity/syntaxTests/types/library_to_address_payable.sol @@ -6,4 +6,4 @@ contract C { } } // ---- -// TypeError: (99-109): Return argument type address is not implicitly convertible to expected type (type of first return variable) address payable. +// TypeError: (99-109): Return argument type "address" is not implicitly convertible to expected type (type of first return variable) "address payable". diff --git a/test/libsolidity/syntaxTests/types/rational_number_bitshift_limit.sol b/test/libsolidity/syntaxTests/types/rational_number_bitshift_limit.sol index 94981aa0c..6f8c8c95a 100644 --- a/test/libsolidity/syntaxTests/types/rational_number_bitshift_limit.sol +++ b/test/libsolidity/syntaxTests/types/rational_number_bitshift_limit.sol @@ -7,7 +7,7 @@ contract c { } } // ---- -// TypeError: (71-80): Type int_const 5221...(1225 digits omitted)...5168 is not implicitly convertible to expected type int256. -// TypeError: (133-142): Operator << not compatible with types int_const 1 and int_const 4096 -// TypeError: (169-182): Operator << not compatible with types int_const 1000...(1226 digits omitted)...0000 and int_const 2 -// TypeError: (169-182): Type int_const 1000...(1226 digits omitted)...0000 is not implicitly convertible to expected type int256. +// TypeError: (71-80): Type "int_const 5221...(1225 digits omitted)...5168" is not implicitly convertible to expected type "int256". +// TypeError: (133-142): Operator "<<" not compatible with types "int_const 1" and "int_const 4096". +// TypeError: (169-182): Operator "<<" not compatible with types "int_const 1000...(1226 digits omitted)...0000" and "int_const 2". +// TypeError: (169-182): Type "int_const 1000...(1226 digits omitted)...0000" is not implicitly convertible to expected type "int256". diff --git a/test/libsolidity/syntaxTests/types/rational_number_div_limit.sol b/test/libsolidity/syntaxTests/types/rational_number_div_limit.sol index 31226781d..920902e87 100644 --- a/test/libsolidity/syntaxTests/types/rational_number_div_limit.sol +++ b/test/libsolidity/syntaxTests/types/rational_number_div_limit.sol @@ -5,5 +5,5 @@ contract c { } } // ---- -// TypeError: (71-92): Operator / not compatible with types rational_const 1 / 5221...(1225 digits omitted)...5168 and int_const 5221...(1225 digits omitted)...5168. Precision of rational constants is limited to 4096 bits. -// TypeError: (71-92): Type rational_const 1 / 5221...(1225 digits omitted)...5168 is not implicitly convertible to expected type int256. Try converting to type ufixed8x80 or use an explicit conversion. +// TypeError: (71-92): Operator "/" not compatible with types "rational_const 1 / 5221...(1225 digits omitted)...5168" and "int_const 5221...(1225 digits omitted)...5168". Precision of rational constants is limited to 4096 bits. +// TypeError: (71-92): Type "rational_const 1 / 5221...(1225 digits omitted)...5168" is not implicitly convertible to expected type "int256". Try converting to type "ufixed8x80" or use an explicit conversion. diff --git a/test/libsolidity/syntaxTests/types/rational_number_exp_limit_fail.sol b/test/libsolidity/syntaxTests/types/rational_number_exp_limit_fail.sol index 80b23eff3..d6cd584e5 100644 --- a/test/libsolidity/syntaxTests/types/rational_number_exp_limit_fail.sol +++ b/test/libsolidity/syntaxTests/types/rational_number_exp_limit_fail.sol @@ -19,29 +19,29 @@ contract c { } } // ---- -// TypeError: (71-102): Operator ** not compatible with types int_const 1797...(301 digits omitted)...7216 and int_const 4. Precision of rational constants is limited to 4096 bits. -// TypeError: (71-102): Type int_const 1797...(301 digits omitted)...7216 is not implicitly convertible to expected type int256. -// TypeError: (116-148): Operator ** not compatible with types int_const 1797...(301 digits omitted)...7216 and int_const 4. Precision of rational constants is limited to 4096 bits. -// TypeError: (116-153): Operator ** not compatible with types int_const 1797...(301 digits omitted)...7216 and int_const 4. Precision of rational constants is limited to 4096 bits. -// TypeError: (116-153): Type int_const 1797...(301 digits omitted)...7216 is not implicitly convertible to expected type int256. -// TypeError: (167-203): Operator ** not compatible with types int_const 4 and int_const -179...(302 digits omitted)...7216 -// TypeError: (217-228): Operator ** not compatible with types int_const 2 and int_const 1000...(1226 digits omitted)...0000 -// TypeError: (242-254): Operator ** not compatible with types int_const -2 and int_const 1000...(1226 digits omitted)...0000 -// TypeError: (268-280): Operator ** not compatible with types int_const 2 and int_const -100...(1227 digits omitted)...0000 -// TypeError: (294-307): Operator ** not compatible with types int_const -2 and int_const -100...(1227 digits omitted)...0000 -// TypeError: (321-332): Operator ** not compatible with types int_const 1000...(1226 digits omitted)...0000 and int_const 2. Precision of rational constants is limited to 4096 bits. -// TypeError: (321-332): Type int_const 1000...(1226 digits omitted)...0000 is not implicitly convertible to expected type int256. -// TypeError: (346-358): Operator ** not compatible with types int_const -100...(1227 digits omitted)...0000 and int_const 2. Precision of rational constants is limited to 4096 bits. -// TypeError: (346-358): Type int_const -100...(1227 digits omitted)...0000 is not implicitly convertible to expected type int256. -// TypeError: (372-384): Operator ** not compatible with types int_const 1000...(1226 digits omitted)...0000 and int_const -2. Precision of rational constants is limited to 4096 bits. -// TypeError: (372-384): Type int_const 1000...(1226 digits omitted)...0000 is not implicitly convertible to expected type int256. -// TypeError: (398-411): Operator ** not compatible with types int_const -100...(1227 digits omitted)...0000 and int_const -2. Precision of rational constants is limited to 4096 bits. -// TypeError: (398-411): Type int_const -100...(1227 digits omitted)...0000 is not implicitly convertible to expected type int256. -// TypeError: (425-441): Operator ** not compatible with types int_const 1000...(1226 digits omitted)...0000 and int_const 1000...(1226 digits omitted)...0000 -// TypeError: (425-441): Type int_const 1000...(1226 digits omitted)...0000 is not implicitly convertible to expected type int256. -// TypeError: (455-472): Operator ** not compatible with types int_const 1000...(1226 digits omitted)...0000 and int_const -100...(1227 digits omitted)...0000 -// TypeError: (455-472): Type int_const 1000...(1226 digits omitted)...0000 is not implicitly convertible to expected type int256. -// TypeError: (486-503): Operator ** not compatible with types int_const -100...(1227 digits omitted)...0000 and int_const 1000...(1226 digits omitted)...0000 -// TypeError: (486-503): Type int_const -100...(1227 digits omitted)...0000 is not implicitly convertible to expected type int256. -// TypeError: (517-535): Operator ** not compatible with types int_const -100...(1227 digits omitted)...0000 and int_const -100...(1227 digits omitted)...0000 -// TypeError: (517-535): Type int_const -100...(1227 digits omitted)...0000 is not implicitly convertible to expected type int256. +// TypeError: (71-102): Operator "**" not compatible with types "int_const 1797...(301 digits omitted)...7216" and "int_const 4". Precision of rational constants is limited to 4096 bits. +// TypeError: (71-102): Type "int_const 1797...(301 digits omitted)...7216" is not implicitly convertible to expected type "int256". +// TypeError: (116-148): Operator "**" not compatible with types "int_const 1797...(301 digits omitted)...7216" and "int_const 4". Precision of rational constants is limited to 4096 bits. +// TypeError: (116-153): Operator "**" not compatible with types "int_const 1797...(301 digits omitted)...7216" and "int_const 4". Precision of rational constants is limited to 4096 bits. +// TypeError: (116-153): Type "int_const 1797...(301 digits omitted)...7216" is not implicitly convertible to expected type "int256". +// TypeError: (167-203): Operator "**" not compatible with types "int_const 4" and "int_const -179...(302 digits omitted)...7216". +// TypeError: (217-228): Operator "**" not compatible with types "int_const 2" and "int_const 1000...(1226 digits omitted)...0000". +// TypeError: (242-254): Operator "**" not compatible with types "int_const -2" and "int_const 1000...(1226 digits omitted)...0000". +// TypeError: (268-280): Operator "**" not compatible with types "int_const 2" and "int_const -100...(1227 digits omitted)...0000". +// TypeError: (294-307): Operator "**" not compatible with types "int_const -2" and "int_const -100...(1227 digits omitted)...0000". +// TypeError: (321-332): Operator "**" not compatible with types "int_const 1000...(1226 digits omitted)...0000" and "int_const 2". Precision of rational constants is limited to 4096 bits. +// TypeError: (321-332): Type "int_const 1000...(1226 digits omitted)...0000" is not implicitly convertible to expected type "int256". +// TypeError: (346-358): Operator "**" not compatible with types "int_const -100...(1227 digits omitted)...0000" and "int_const 2". Precision of rational constants is limited to 4096 bits. +// TypeError: (346-358): Type "int_const -100...(1227 digits omitted)...0000" is not implicitly convertible to expected type "int256". +// TypeError: (372-384): Operator "**" not compatible with types "int_const 1000...(1226 digits omitted)...0000" and "int_const -2". Precision of rational constants is limited to 4096 bits. +// TypeError: (372-384): Type "int_const 1000...(1226 digits omitted)...0000" is not implicitly convertible to expected type "int256". +// TypeError: (398-411): Operator "**" not compatible with types "int_const -100...(1227 digits omitted)...0000" and "int_const -2". Precision of rational constants is limited to 4096 bits. +// TypeError: (398-411): Type "int_const -100...(1227 digits omitted)...0000" is not implicitly convertible to expected type "int256". +// TypeError: (425-441): Operator "**" not compatible with types "int_const 1000...(1226 digits omitted)...0000" and "int_const 1000...(1226 digits omitted)...0000". +// TypeError: (425-441): Type "int_const 1000...(1226 digits omitted)...0000" is not implicitly convertible to expected type "int256". +// TypeError: (455-472): Operator "**" not compatible with types "int_const 1000...(1226 digits omitted)...0000" and "int_const -100...(1227 digits omitted)...0000". +// TypeError: (455-472): Type "int_const 1000...(1226 digits omitted)...0000" is not implicitly convertible to expected type "int256". +// TypeError: (486-503): Operator "**" not compatible with types "int_const -100...(1227 digits omitted)...0000" and "int_const 1000...(1226 digits omitted)...0000". +// TypeError: (486-503): Type "int_const -100...(1227 digits omitted)...0000" is not implicitly convertible to expected type "int256". +// TypeError: (517-535): Operator "**" not compatible with types "int_const -100...(1227 digits omitted)...0000" and "int_const -100...(1227 digits omitted)...0000". +// TypeError: (517-535): Type "int_const -100...(1227 digits omitted)...0000" is not implicitly convertible to expected type "int256". diff --git a/test/libsolidity/syntaxTests/types/rational_number_huge_fail.sol b/test/libsolidity/syntaxTests/types/rational_number_huge_fail.sol index 08e506562..11889d521 100644 --- a/test/libsolidity/syntaxTests/types/rational_number_huge_fail.sol +++ b/test/libsolidity/syntaxTests/types/rational_number_huge_fail.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (142-209): Type int_const 1852...(71 digits omitted)...7281 is not implicitly convertible to expected type uint256. +// TypeError: (142-209): Type "int_const 1852...(71 digits omitted)...7281" is not implicitly convertible to expected type "uint256". diff --git a/test/libsolidity/syntaxTests/types/rational_number_mul_limit.sol b/test/libsolidity/syntaxTests/types/rational_number_mul_limit.sol index d725b43af..901f7a84c 100644 --- a/test/libsolidity/syntaxTests/types/rational_number_mul_limit.sol +++ b/test/libsolidity/syntaxTests/types/rational_number_mul_limit.sol @@ -5,5 +5,5 @@ contract c { } } // ---- -// TypeError: (71-90): Operator * not compatible with types int_const 5221...(1225 digits omitted)...5168 and int_const 5221...(1225 digits omitted)...5168. Precision of rational constants is limited to 4096 bits. -// TypeError: (71-90): Type int_const 5221...(1225 digits omitted)...5168 is not implicitly convertible to expected type int256. +// TypeError: (71-90): Operator "*" not compatible with types "int_const 5221...(1225 digits omitted)...5168" and "int_const 5221...(1225 digits omitted)...5168". Precision of rational constants is limited to 4096 bits. +// TypeError: (71-90): Type "int_const 5221...(1225 digits omitted)...5168" is not implicitly convertible to expected type "int256". diff --git a/test/libsolidity/syntaxTests/types/rational_number_signed_to_unsigned.sol b/test/libsolidity/syntaxTests/types/rational_number_signed_to_unsigned.sol index 735968952..ea0e8ec45 100644 --- a/test/libsolidity/syntaxTests/types/rational_number_signed_to_unsigned.sol +++ b/test/libsolidity/syntaxTests/types/rational_number_signed_to_unsigned.sol @@ -4,4 +4,4 @@ contract c { } } // ---- -// TypeError: (52-63): Type int_const -1 is not implicitly convertible to expected type uint256. Cannot implicitly convert signed literal to unsigned type. +// TypeError: (52-63): Type "int_const -1" is not implicitly convertible to expected type "uint256". Cannot implicitly convert signed literal to unsigned type. diff --git a/test/libsolidity/syntaxTests/types/rational_number_too_large.sol b/test/libsolidity/syntaxTests/types/rational_number_too_large.sol index eb2215010..fe9a7e1e5 100644 --- a/test/libsolidity/syntaxTests/types/rational_number_too_large.sol +++ b/test/libsolidity/syntaxTests/types/rational_number_too_large.sol @@ -4,4 +4,4 @@ contract c { } } // ---- -// TypeError: (52-65): Type int_const 256 is not implicitly convertible to expected type uint8. Literal is too large to fit in uint8. +// TypeError: (52-65): Type "int_const 256" is not implicitly convertible to expected type "uint8". Literal is too large to fit in "uint8". diff --git a/test/libsolidity/syntaxTests/types/too_small_negative_numbers.sol b/test/libsolidity/syntaxTests/types/too_small_negative_numbers.sol index f86ffcdd8..e2be0d833 100644 --- a/test/libsolidity/syntaxTests/types/too_small_negative_numbers.sol +++ b/test/libsolidity/syntaxTests/types/too_small_negative_numbers.sol @@ -2,4 +2,4 @@ contract C { fixed8x80 a = -1e-100; } // ---- -// TypeError: (29-36): Type rational_const -1 / 1000...(93 digits omitted)...0000 is not implicitly convertible to expected type fixed8x80, but it can be explicitly converted. +// TypeError: (29-36): Type "rational_const -1 / 1000...(93 digits omitted)...0000" is not implicitly convertible to expected type "fixed8x80", but it can be explicitly converted. diff --git a/test/libsolidity/syntaxTests/types/var_type_invalid_rational.sol b/test/libsolidity/syntaxTests/types/var_type_invalid_rational.sol index a7c006411..877539dfb 100644 --- a/test/libsolidity/syntaxTests/types/var_type_invalid_rational.sol +++ b/test/libsolidity/syntaxTests/types/var_type_invalid_rational.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (62-136): Invalid rational int_const 3100...(204 digits omitted)...9237 (absolute value too large or division by zero). +// TypeError: (62-136): Invalid rational "int_const 3100...(204 digits omitted)...9237" (absolute value too large or division by zero). diff --git a/test/libsolidity/syntaxTests/types/var_type_suggest.sol b/test/libsolidity/syntaxTests/types/var_type_suggest.sol index 392d7bc83..75091662c 100644 --- a/test/libsolidity/syntaxTests/types/var_type_suggest.sol +++ b/test/libsolidity/syntaxTests/types/var_type_suggest.sol @@ -20,11 +20,11 @@ contract C { } } // ---- -// SyntaxError: (224-238): Use of the "var" keyword is disallowed. Use explicit declaration `int16 s = ...´ instead. -// SyntaxError: (248-261): Use of the "var" keyword is disallowed. Use explicit declaration `uint16 i = ...´ instead. -// SyntaxError: (271-287): Use of the "var" keyword is disallowed. Use explicit declaration `string memory t = ...´ instead. -// SyntaxError: (297-307): Use of the "var" keyword is disallowed. Use explicit declaration `function (uint256) pure returns (uint256) g2 = ...´ instead. +// SyntaxError: (224-238): Use of the "var" keyword is disallowed. Use explicit declaration "int16 s = ..." instead. +// SyntaxError: (248-261): Use of the "var" keyword is disallowed. Use explicit declaration "uint16 i = ..." instead. +// SyntaxError: (271-287): Use of the "var" keyword is disallowed. Use explicit declaration "string memory t = ..." instead. +// SyntaxError: (297-307): Use of the "var" keyword is disallowed. Use explicit declaration "function (uint256) pure returns (uint256) g2 = ..." instead. // SyntaxError: (317-350): Use of the "var" keyword is disallowed. Type cannot be expressed in syntax. -// SyntaxError: (360-384): Use of the "var" keyword is disallowed. Use explicit declaration `(uint8 a, string memory b) = ...´ instead. -// SyntaxError: (394-411): Use of the "var" keyword is disallowed. Use explicit declaration `(uint256 x, , uint256 z) = ...´ instead. +// SyntaxError: (360-384): Use of the "var" keyword is disallowed. Use explicit declaration "(uint8 a, string memory b) = ..." instead. +// SyntaxError: (394-411): Use of the "var" keyword is disallowed. Use explicit declaration "(uint256 x, , uint256 z) = ..." instead. // TypeError: (421-438): Different number of components on the left hand side (2) than on the right hand side (1). diff --git a/test/libsolidity/syntaxTests/unimplemented_super_function.sol b/test/libsolidity/syntaxTests/unimplemented_super_function.sol index 6a11c9ca7..3574a6a6f 100644 --- a/test/libsolidity/syntaxTests/unimplemented_super_function.sol +++ b/test/libsolidity/syntaxTests/unimplemented_super_function.sol @@ -5,4 +5,4 @@ contract b is a { function f() public override { super.f(); } } // ---- -// TypeError: (110-117): Member "f" not found or not visible after argument-dependent lookup in contract super b. +// TypeError: (110-117): Member "f" not found or not visible after argument-dependent lookup in "contract super b". diff --git a/test/libsolidity/syntaxTests/unimplemented_super_function_derived.sol b/test/libsolidity/syntaxTests/unimplemented_super_function_derived.sol index 1dcc339eb..b8cdc1be1 100644 --- a/test/libsolidity/syntaxTests/unimplemented_super_function_derived.sol +++ b/test/libsolidity/syntaxTests/unimplemented_super_function_derived.sol @@ -9,4 +9,4 @@ contract c is a,b { function f() public override(a, b) { super.f(); } } // ---- -// TypeError: (118-125): Member "f" not found or not visible after argument-dependent lookup in contract super b. +// TypeError: (118-125): Member "f" not found or not visible after argument-dependent lookup in "contract super b". diff --git a/test/libsolidity/syntaxTests/unterminatedBlocks/one_dot_x.sol b/test/libsolidity/syntaxTests/unterminatedBlocks/one_dot_x.sol index 3cc59374c..f04f0dc93 100644 --- a/test/libsolidity/syntaxTests/unterminatedBlocks/one_dot_x.sol +++ b/test/libsolidity/syntaxTests/unterminatedBlocks/one_dot_x.sol @@ -2,4 +2,4 @@ contract test { function f() pure public { 1.x; } } // ---- -// TypeError: (47-50): Member "x" not found or not visible after argument-dependent lookup in int_const 1. \ No newline at end of file +// TypeError: (47-50): Member "x" not found or not visible after argument-dependent lookup in "int_const 1". diff --git a/test/libsolidity/syntaxTests/unterminatedBlocks/zero_dot_x.sol b/test/libsolidity/syntaxTests/unterminatedBlocks/zero_dot_x.sol index 8648bce24..136aabe43 100644 --- a/test/libsolidity/syntaxTests/unterminatedBlocks/zero_dot_x.sol +++ b/test/libsolidity/syntaxTests/unterminatedBlocks/zero_dot_x.sol @@ -2,4 +2,4 @@ contract test { function f() pure public { 0.x; } } // ---- -// TypeError: (47-50): Member "x" not found or not visible after argument-dependent lookup in int_const 0. \ No newline at end of file +// TypeError: (47-50): Member "x" not found or not visible after argument-dependent lookup in "int_const 0". diff --git a/test/libsolidity/syntaxTests/viewPure/view_pure_abi_encode_arguments.sol b/test/libsolidity/syntaxTests/viewPure/view_pure_abi_encode_arguments.sol index cc845d513..5ea46af2f 100644 --- a/test/libsolidity/syntaxTests/viewPure/view_pure_abi_encode_arguments.sol +++ b/test/libsolidity/syntaxTests/viewPure/view_pure_abi_encode_arguments.sol @@ -33,4 +33,4 @@ contract C { } } // ---- -// Warning: (1100-1184): Function state mutability can be restricted to pure +// Warning: (1100-1184): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/access_to_base_member_function.sol b/test/libsolidity/syntaxTests/viewPureChecker/access_to_base_member_function.sol index f894f2922..ffcd91bb8 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/access_to_base_member_function.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/access_to_base_member_function.sol @@ -8,4 +8,4 @@ contract B is A { } } // ---- -// TypeError: (100-105): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. +// TypeError: (100-105): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/access_to_base_member_struct.sol b/test/libsolidity/syntaxTests/viewPureChecker/access_to_base_member_struct.sol index 09a9f636b..7e6dd9e94 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/access_to_base_member_struct.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/access_to_base_member_struct.sol @@ -15,7 +15,7 @@ contract B is A { } } // ---- -// TypeError: (107-110): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. -// TypeError: (166-171): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. -// TypeError: (244-247): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". -// TypeError: (244-249): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (107-110): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". +// TypeError: (166-171): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". +// TypeError: (244-247): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (244-249): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/access_to_base_members.sol b/test/libsolidity/syntaxTests/viewPureChecker/access_to_base_members.sol index 477cee74a..5930b9886 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/access_to_base_members.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/access_to_base_members.sol @@ -11,5 +11,5 @@ contract B is A { } } // ---- -// TypeError: (107-110): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". -// TypeError: (157-160): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. +// TypeError: (107-110): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (157-160): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/array/access_to_array_push_view.sol b/test/libsolidity/syntaxTests/viewPureChecker/array/access_to_array_push_view.sol index c9fe1fe8e..86c9d111d 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/array/access_to_array_push_view.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/array/access_to_array_push_view.sol @@ -5,4 +5,4 @@ contract A { } } // ---- -// TypeError: (88-96): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. +// TypeError: (88-96): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/array/access_to_base_member_array.sol b/test/libsolidity/syntaxTests/viewPureChecker/array/access_to_base_member_array.sol index 9562c0689..f13dda87b 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/array/access_to_base_member_array.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/array/access_to_base_member_array.sol @@ -11,7 +11,7 @@ contract B is A { } } // ---- -// TypeError: (109-112): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". -// TypeError: (109-119): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". -// TypeError: (188-191): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". -// TypeError: (188-194): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (109-112): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (109-119): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (188-191): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (188-194): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions_restrict_warning.sol b/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions_restrict_warning.sol index 4a651d211..1bc378e8a 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions_restrict_warning.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions_restrict_warning.sol @@ -17,5 +17,5 @@ contract C { } } // ---- -// Warning: (17-288): Function state mutability can be restricted to pure -// Warning: (293-559): Function state mutability can be restricted to pure +// Warning: (17-288): Function state mutability can be restricted to "pure". +// Warning: (293-559): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions_view_fail.sol b/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions_view_fail.sol index 1cc7c8d4f..bd821fbd8 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions_view_fail.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions_view_fail.sol @@ -20,8 +20,8 @@ contract C { } } // ---- -// TypeError: (52-77): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. -// TypeError: (132-153): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. -// TypeError: (201-228): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. -// TypeError: (293-323): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. -// TypeError: (414-436): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. +// TypeError: (52-77): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". +// TypeError: (132-153): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". +// TypeError: (201-228): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". +// TypeError: (293-323): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". +// TypeError: (414-436): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/call_internal_functions_fail.sol b/test/libsolidity/syntaxTests/viewPureChecker/call_internal_functions_fail.sol index e21037bd9..1bd6f31cd 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/call_internal_functions_fail.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/call_internal_functions_fail.sol @@ -6,5 +6,5 @@ contract C { function i() public { x = 2; } } // ---- -// TypeError: (56-59): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". -// TypeError: (130-133): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. +// TypeError: (56-59): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (130-133): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/callvalue_nonpayable_assembly_function.sol b/test/libsolidity/syntaxTests/viewPureChecker/callvalue_nonpayable_assembly_function.sol index fbd2fc44a..fcec40577 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/callvalue_nonpayable_assembly_function.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/callvalue_nonpayable_assembly_function.sol @@ -7,4 +7,4 @@ contract C } } // ---- -// Warning: (17-108): Function state mutability can be restricted to view +// Warning: (17-108): Function state mutability can be restricted to "view". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/callvalue_nonpayable_assembly_function_internal.sol b/test/libsolidity/syntaxTests/viewPureChecker/callvalue_nonpayable_assembly_function_internal.sol index 300c1c278..e81b3656b 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/callvalue_nonpayable_assembly_function_internal.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/callvalue_nonpayable_assembly_function_internal.sol @@ -10,4 +10,4 @@ contract C } } // ---- -// Warning: (17-121): Function state mutability can be restricted to view +// Warning: (17-121): Function state mutability can be restricted to "view". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/constant_restrict_warning.sol b/test/libsolidity/syntaxTests/viewPureChecker/constant_restrict_warning.sol index a4b4a3536..64253a31c 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/constant_restrict_warning.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/constant_restrict_warning.sol @@ -8,5 +8,5 @@ contract C { } } // ---- -// Warning: (42-107): Function state mutability can be restricted to pure -// Warning: (112-172): Function state mutability can be restricted to pure +// Warning: (42-107): Function state mutability can be restricted to "pure". +// Warning: (112-172): Function state mutability can be restricted to "pure". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/creation_view_fail.sol b/test/libsolidity/syntaxTests/viewPureChecker/creation_view_fail.sol index 08e45ea1e..c8abb1be4 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/creation_view_fail.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/creation_view_fail.sol @@ -3,4 +3,4 @@ contract C { function f() public view { new D(); } } // ---- -// TypeError: (58-65): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. +// TypeError: (58-65): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/function_types_fail.sol b/test/libsolidity/syntaxTests/viewPureChecker/function_types_fail.sol index d00f65c9b..8647e9b9f 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/function_types_fail.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/function_types_fail.sol @@ -13,6 +13,6 @@ contract C { } } // ---- -// TypeError: (92-103): Function declared as pure, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. -// TypeError: (193-202): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". -// TypeError: (289-300): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. +// TypeError: (92-103): Function declared as "pure", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". +// TypeError: (193-202): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (289-300): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/gas_with_call_nonpayable.sol b/test/libsolidity/syntaxTests/viewPureChecker/gas_with_call_nonpayable.sol index 0a58a516c..dcbe02cb0 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/gas_with_call_nonpayable.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/gas_with_call_nonpayable.sol @@ -11,6 +11,6 @@ contract C { } } // ---- -// TypeError: (90-108): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. -// TypeError: (190-208): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. -// TypeError: (279-295): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. +// TypeError: (90-108): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". +// TypeError: (190-208): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". +// TypeError: (279-295): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/local_storage_variables_fail.sol b/test/libsolidity/syntaxTests/viewPureChecker/local_storage_variables_fail.sol index 0ff1ac241..979b65ea6 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/local_storage_variables_fail.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/local_storage_variables_fail.sol @@ -11,5 +11,5 @@ contract C { } } // ---- -// TypeError: (100-101): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". -// TypeError: (184-187): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. +// TypeError: (100-101): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (184-187): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/modifiers_fail.sol b/test/libsolidity/syntaxTests/viewPureChecker/modifiers_fail.sol index 513850f77..b3d29aab8 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/modifiers_fail.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/modifiers_fail.sol @@ -8,5 +8,5 @@ contract C is D { function g() nonpayablem(0) view public {} } // ---- -// TypeError: (154-162): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". -// TypeError: (195-209): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. +// TypeError: (154-162): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (195-209): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/msg_value_modifier.sol b/test/libsolidity/syntaxTests/viewPureChecker/msg_value_modifier.sol index 160b20a74..a91fa0e22 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/msg_value_modifier.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/msg_value_modifier.sol @@ -3,4 +3,4 @@ contract C { function f() m(1 ether, msg.value) public pure {} } // ---- -// TypeError: (118-127): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (118-127): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/read_storage_pure_fail.sol b/test/libsolidity/syntaxTests/viewPureChecker/read_storage_pure_fail.sol index 785656b91..125cfd431 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/read_storage_pure_fail.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/read_storage_pure_fail.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// TypeError: (86-87): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (86-87): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/returning_structs_fail.sol b/test/libsolidity/syntaxTests/viewPureChecker/returning_structs_fail.sol index e04d08254..0d0288601 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/returning_structs_fail.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/returning_structs_fail.sol @@ -9,5 +9,5 @@ contract C { } } // ---- -// TypeError: (115-116): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". -// TypeError: (163-168): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (115-116): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (163-168): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/selector_complex.sol b/test/libsolidity/syntaxTests/viewPureChecker/selector_complex.sol index 311dec4a4..28542d053 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/selector_complex.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/selector_complex.sol @@ -8,4 +8,4 @@ contract C { } } // ---- -// TypeError: (228-232): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". +// TypeError: (228-232): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/suggest_view.sol b/test/libsolidity/syntaxTests/viewPureChecker/suggest_view.sol index c045dfc4c..911cec36d 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/suggest_view.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/suggest_view.sol @@ -3,4 +3,4 @@ contract C { function g() public returns (uint) { return x; } } // ---- -// Warning: (29-77): Function state mutability can be restricted to view +// Warning: (29-77): Function state mutability can be restricted to "view". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/value_with_call_nonpayable.sol b/test/libsolidity/syntaxTests/viewPureChecker/value_with_call_nonpayable.sol index cf5d885c9..278be74b5 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/value_with_call_nonpayable.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/value_with_call_nonpayable.sol @@ -11,6 +11,6 @@ contract C { } } // ---- -// TypeError: (90-110): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. -// TypeError: (192-212): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. -// TypeError: (283-301): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. +// TypeError: (90-110): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". +// TypeError: (192-212): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". +// TypeError: (283-301): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". diff --git a/test/libsolidity/syntaxTests/viewPureChecker/write_storage_fail.sol b/test/libsolidity/syntaxTests/viewPureChecker/write_storage_fail.sol index 3fed4d297..f139074a4 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/write_storage_fail.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/write_storage_fail.sol @@ -3,4 +3,4 @@ contract C { function f() view public { x = 2; } } // ---- -// TypeError: (56-57): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable. +// TypeError: (56-57): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable". diff --git a/test/libyul/Parser.cpp b/test/libyul/Parser.cpp index 6f25304d8..14c0d06d9 100644 --- a/test/libyul/Parser.cpp +++ b/test/libyul/Parser.cpp @@ -156,14 +156,14 @@ BOOST_AUTO_TEST_CASE(period_in_identifier) BOOST_AUTO_TEST_CASE(period_not_as_identifier_start) { - CHECK_ERROR("{ let .y:u256 }", ParserError, "Expected identifier but got '.'"); + CHECK_ERROR("{ let .y:u256 }", ParserError, "Expected identifier but got " + quote(".")); } BOOST_AUTO_TEST_CASE(period_in_identifier_spaced) { - CHECK_ERROR("{ let x. y:u256 }", ParserError, "Expected ':' but got identifier"); - CHECK_ERROR("{ let x .y:u256 }", ParserError, "Expected ':' but got '.'"); - CHECK_ERROR("{ let x . y:u256 }", ParserError, "Expected ':' but got '.'"); + CHECK_ERROR("{ let x. y:u256 }", ParserError, "Expected" + quoteSpace(":") + "but got identifier"); + CHECK_ERROR("{ let x .y:u256 }", ParserError, "Expected" + quoteSpace(":") + "but got " + quote(".")); + CHECK_ERROR("{ let x . y:u256 }", ParserError, "Expected" + quoteSpace(":") + "but got " + quote(".")); } BOOST_AUTO_TEST_CASE(period_in_identifier_start) @@ -236,20 +236,20 @@ BOOST_AUTO_TEST_CASE(tokens_as_identifers) BOOST_AUTO_TEST_CASE(lacking_types) { - CHECK_ERROR("{ let x := 1:u256 }", ParserError, "Expected ':' but got ':='"); - CHECK_ERROR("{ let x:u256 := 1 }", ParserError, "Expected ':' but got '}'"); - CHECK_ERROR("{ function f(a) {} }", ParserError, "Expected ':' but got ')'"); - CHECK_ERROR("{ function f(a:u256) -> b {} }", ParserError, "Expected ':' but got '{'"); + CHECK_ERROR("{ let x := 1:u256 }", ParserError, "Expected" + quoteSpace(":") + "but got " + quote(":=")); + CHECK_ERROR("{ let x:u256 := 1 }", ParserError, "Expected" + quoteSpace(":") + "but got " + quote("}")); + CHECK_ERROR("{ function f(a) {} }", ParserError, "Expected" + quoteSpace(":") + "but got " + quote(")")); + CHECK_ERROR("{ function f(a:u256) -> b {} }", ParserError, "Expected" + quoteSpace(":") + "but got " + quote("{")); } BOOST_AUTO_TEST_CASE(invalid_types) { /// testing invalid literal /// NOTE: these will need to change when types are compared - CHECK_ERROR("{ let x:bool := 1:invalid }", TypeError, "\"invalid\" is not a valid type (user defined types are not yet supported)."); + CHECK_ERROR("{ let x:bool := 1:invalid }", TypeError, quote("invalid") + " is not a valid type (user defined types are not yet supported)."); /// testing invalid variable declaration - CHECK_ERROR("{ let x:invalid := 1:bool }", TypeError, "\"invalid\" is not a valid type (user defined types are not yet supported)."); - CHECK_ERROR("{ function f(a:invalid) {} }", TypeError, "\"invalid\" is not a valid type (user defined types are not yet supported)."); + CHECK_ERROR("{ let x:invalid := 1:bool }", TypeError, quote("invalid") + " is not a valid type (user defined types are not yet supported)."); + CHECK_ERROR("{ function f(a:invalid) {} }", TypeError, quote("invalid") + " is not a valid type (user defined types are not yet supported)."); } BOOST_AUTO_TEST_CASE(number_literals) @@ -290,8 +290,8 @@ BOOST_AUTO_TEST_CASE(recursion_depth) BOOST_AUTO_TEST_CASE(multiple_assignment) { - CHECK_ERROR("{ let x:u256 function f() -> a:u256, b:u256 {} 123:u256, x := f() }", ParserError, "Variable name must precede \",\" in multiple assignment."); - CHECK_ERROR("{ let x:u256 function f() -> a:u256, b:u256 {} x, 123:u256 := f() }", ParserError, "Variable name must precede \":=\" in assignment."); + CHECK_ERROR("{ let x:u256 function f() -> a:u256, b:u256 {} 123:u256, x := f() }", ParserError, "Variable name must precede" + quoteSpace(",") + "in multiple assignment."); + CHECK_ERROR("{ let x:u256 function f() -> a:u256, b:u256 {} x, 123:u256 := f() }", ParserError, "Variable name must precede" + quoteSpace(":=") + "in assignment."); /// NOTE: Travis hiccups if not having a variable char const* text = R"( @@ -320,7 +320,7 @@ BOOST_AUTO_TEST_CASE(break_outside_of_for_loop) CHECK_ERROR_DIALECT( "{ let x if x { break } }", SyntaxError, - "Keyword \"break\" needs to be inside a for-loop body.", + "Keyword" + quoteSpace("break") + "needs to be inside a for-loop body.", EVMDialect::strictAssemblyForEVMObjects(EVMVersion::constantinople()) ); } @@ -330,7 +330,7 @@ BOOST_AUTO_TEST_CASE(continue_outside_of_for_loop) CHECK_ERROR_DIALECT( "{ let x if x { continue } }", SyntaxError, - "Keyword \"continue\" needs to be inside a for-loop body.", + "Keyword" + quoteSpace("continue") + "needs to be inside a for-loop body.", EVMDialect::strictAssemblyForEVMObjects(EVMVersion::constantinople()) ); } @@ -353,7 +353,7 @@ BOOST_AUTO_TEST_CASE(for_statement_break_init) CHECK_ERROR_DIALECT( "{ for {let i := 0 break} iszero(eq(i, 10)) {i := add(i, 1)} {} }", SyntaxError, - "Keyword \"break\" in for-loop init block is not allowed.", + "Keyword" + quoteSpace("break") + "in for-loop init block is not allowed.", dialect ); } @@ -364,7 +364,7 @@ BOOST_AUTO_TEST_CASE(for_statement_break_post) CHECK_ERROR_DIALECT( "{ for {let i := 0} iszero(eq(i, 10)) {i := add(i, 1) break} {} }", SyntaxError, - "Keyword \"break\" in for-loop post block is not allowed.", + "Keyword" + quoteSpace("break") + "in for-loop post block is not allowed.", dialect ); } @@ -375,7 +375,7 @@ BOOST_AUTO_TEST_CASE(for_statement_nested_break) CHECK_ERROR_DIALECT( "{ for {let i := 0} iszero(eq(i, 10)) {} { function f() { break } } }", SyntaxError, - "Keyword \"break\" needs to be inside a for-loop body.", + "Keyword" + quoteSpace("break") + "needs to be inside a for-loop body.", dialect ); } @@ -392,7 +392,7 @@ BOOST_AUTO_TEST_CASE(for_statement_continue_fail_init) CHECK_ERROR_DIALECT( "{ for {let i := 0 continue} iszero(eq(i, 10)) {i := add(i, 1)} {} }", SyntaxError, - "Keyword \"continue\" in for-loop init block is not allowed.", + "Keyword" + quoteSpace("continue") + "in for-loop init block is not allowed.", dialect ); } @@ -403,7 +403,7 @@ BOOST_AUTO_TEST_CASE(for_statement_continue_fail_post) CHECK_ERROR_DIALECT( "{ for {let i := 0} iszero(eq(i, 10)) {i := add(i, 1) continue} {} }", SyntaxError, - "Keyword \"continue\" in for-loop post block is not allowed.", + "Keyword" + quoteSpace("continue") + "in for-loop post block is not allowed.", dialect ); } @@ -414,7 +414,7 @@ BOOST_AUTO_TEST_CASE(for_statement_nested_continue) CHECK_ERROR_DIALECT( "{ for {let i := 0} iszero(eq(i, 10)) {} { function f() { continue } } }", SyntaxError, - "Keyword \"continue\" needs to be inside a for-loop body.", + "Keyword" + quoteSpace("continue") + "needs to be inside a for-loop body.", dialect ); } @@ -425,7 +425,7 @@ BOOST_AUTO_TEST_CASE(for_statement_continue_nested_init_in_body) CHECK_ERROR_DIALECT( "{ for {} 1 {} {let x for { continue } x {} {}} }", SyntaxError, - "Keyword \"continue\" in for-loop init block is not allowed.", + "Keyword" + quoteSpace("continue") + "in for-loop init block is not allowed.", dialect ); } @@ -491,7 +491,7 @@ BOOST_AUTO_TEST_CASE(function_defined_in_init_nested) BOOST_AUTO_TEST_CASE(if_statement_invalid) { CHECK_ERROR("{ if let x:u256 {} }", ParserError, "Literal or identifier expected."); - CHECK_ERROR("{ if true:bool let x:u256 := 3:u256 }", ParserError, "Expected '{' but got reserved keyword 'let'"); + CHECK_ERROR("{ if true:bool let x:u256 := 3:u256 }", ParserError, "Expected" + quoteSpace("{") + "but got reserved keyword " + quote("let")); // TODO change this to an error once we check types. BOOST_CHECK(successParse("{ if 42:u256 { } }")); } @@ -540,11 +540,11 @@ BOOST_AUTO_TEST_CASE(builtins_parser) }; SimpleDialect dialect; - CHECK_ERROR_DIALECT("{ let builtin := 6 }", ParserError, "Cannot use builtin function name \"builtin\" as identifier name.", dialect); - CHECK_ERROR_DIALECT("{ function builtin() {} }", ParserError, "Cannot use builtin function name \"builtin\" as identifier name.", dialect); - CHECK_ERROR_DIALECT("{ function f(x) { f(builtin) } }", ParserError, "Expected '(' but got ')'", dialect); - CHECK_ERROR_DIALECT("{ function f(builtin) {}", ParserError, "Cannot use builtin function name \"builtin\" as identifier name.", dialect); - CHECK_ERROR_DIALECT("{ function f() -> builtin {}", ParserError, "Cannot use builtin function name \"builtin\" as identifier name.", dialect); + CHECK_ERROR_DIALECT("{ let builtin := 6 }", ParserError, "Cannot use builtin function name" + quoteSpace("builtin") + "as identifier name.", dialect); + CHECK_ERROR_DIALECT("{ function builtin() {} }", ParserError, "Cannot use builtin function name" + quoteSpace("builtin") + "as identifier name.", dialect); + CHECK_ERROR_DIALECT("{ function f(x) { f(builtin) } }", ParserError, "Expected" + quote("(") + "but got " + quote(")"), dialect); + CHECK_ERROR_DIALECT("{ function f(builtin) {}", ParserError, "Cannot use builtin function name" + quoteSpace("builtin") + "as identifier name.", dialect); + CHECK_ERROR_DIALECT("{ function f() -> builtin {}", ParserError, "Cannot use builtin function name" + quoteSpace("builtin") + "as identifier name.", dialect); } BOOST_AUTO_TEST_CASE(builtins_analysis)