diff options
-rw-r--r-- | Changelog.md | 1 | ||||
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 12 | ||||
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 143 | ||||
-rw-r--r-- | libsolidity/interface/ErrorReporter.cpp | 37 | ||||
-rw-r--r-- | libsolidity/interface/ErrorReporter.h | 9 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/more_than_256_declarationerrors.sol | 524 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/more_than_256_syntaxerrors.sol | 524 |
7 files changed, 1172 insertions, 78 deletions
diff --git a/Changelog.md b/Changelog.md index 8c9ba460..c918f171 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,7 @@ Features: * Code Generator: Initialize arrays without using ``msize()``. * Code Generator: More specialized and thus optimized implementation for ``x.push(...)`` * Commandline interface: Error when missing or inaccessible file detected. Suppress it with the ``--ignore-missing`` flag. + * General: Limit the number of errors output in a single run to 256. * General: Support accessing dynamic return data in post-byzantium EVMs. * Interfaces: Allow overriding external functions in interfaces with public in an implementing contract. * Optimizer: Remove useless ``SWAP1`` instruction preceding a commutative instruction (such as ``ADD``, ``MUL``, etc). diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index abe57778..8b57fc15 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -60,17 +60,7 @@ bool typeSupportedByOldABIEncoder(Type const& _type) bool TypeChecker::checkTypeRequirements(ASTNode const& _contract) { - try - { - _contract.accept(*this); - } - catch (FatalError const&) - { - // We got a fatal error which required to stop further type checking, but we can - // continue normally from here. - if (m_errorReporter.errors().empty()) - throw; // Something is weird here, rather throw again. - } + _contract.accept(*this); return Error::containsOnlyWarnings(m_errorReporter.errors()); } diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index eacfca9c..4ff14aa2 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -164,85 +164,94 @@ bool CompilerStack::analyze() resolveImports(); bool noErrors = true; - SyntaxChecker syntaxChecker(m_errorReporter); - for (Source const* source: m_sourceOrder) - if (!syntaxChecker.checkSyntax(*source->ast)) - noErrors = false; - - DocStringAnalyser docStringAnalyser(m_errorReporter); - for (Source const* source: m_sourceOrder) - if (!docStringAnalyser.analyseDocStrings(*source->ast)) - noErrors = false; - m_globalContext = make_shared<GlobalContext>(); - NameAndTypeResolver resolver(m_globalContext->declarations(), m_scopes, m_errorReporter); - for (Source const* source: m_sourceOrder) - if (!resolver.registerDeclarations(*source->ast)) - return false; - - map<string, SourceUnit const*> sourceUnitsByName; - for (auto& source: m_sources) - sourceUnitsByName[source.first] = source.second.ast.get(); - for (Source const* source: m_sourceOrder) - if (!resolver.performImports(*source->ast, sourceUnitsByName)) - return false; + try { + SyntaxChecker syntaxChecker(m_errorReporter); + for (Source const* source: m_sourceOrder) + if (!syntaxChecker.checkSyntax(*source->ast)) + noErrors = false; - for (Source const* source: m_sourceOrder) - for (ASTPointer<ASTNode> const& node: source->ast->nodes()) - if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get())) - { - m_globalContext->setCurrentContract(*contract); - if (!resolver.updateDeclaration(*m_globalContext->currentThis())) return false; - if (!resolver.updateDeclaration(*m_globalContext->currentSuper())) return false; - if (!resolver.resolveNamesAndTypes(*contract)) return false; - - // Note that we now reference contracts by their fully qualified names, and - // thus contracts can only conflict if declared in the same source file. This - // already causes a double-declaration error elsewhere, so we do not report - // an error here and instead silently drop any additional contracts we find. - - if (m_contracts.find(contract->fullyQualifiedName()) == m_contracts.end()) - m_contracts[contract->fullyQualifiedName()].contract = contract; - } + DocStringAnalyser docStringAnalyser(m_errorReporter); + for (Source const* source: m_sourceOrder) + if (!docStringAnalyser.analyseDocStrings(*source->ast)) + noErrors = false; - TypeChecker typeChecker(m_evmVersion, m_errorReporter); - for (Source const* source: m_sourceOrder) - for (ASTPointer<ASTNode> const& node: source->ast->nodes()) - if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get())) - if (!typeChecker.checkTypeRequirements(*contract)) - noErrors = false; + m_globalContext = make_shared<GlobalContext>(); + NameAndTypeResolver resolver(m_globalContext->declarations(), m_scopes, m_errorReporter); + for (Source const* source: m_sourceOrder) + if (!resolver.registerDeclarations(*source->ast)) + return false; - if (noErrors) - { - PostTypeChecker postTypeChecker(m_errorReporter); + map<string, SourceUnit const*> sourceUnitsByName; + for (auto& source: m_sources) + sourceUnitsByName[source.first] = source.second.ast.get(); for (Source const* source: m_sourceOrder) - if (!postTypeChecker.check(*source->ast)) - noErrors = false; - } + if (!resolver.performImports(*source->ast, sourceUnitsByName)) + return false; - if (noErrors) - { - StaticAnalyzer staticAnalyzer(m_errorReporter); for (Source const* source: m_sourceOrder) - if (!staticAnalyzer.analyze(*source->ast)) - noErrors = false; - } + for (ASTPointer<ASTNode> const& node: source->ast->nodes()) + if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get())) + { + m_globalContext->setCurrentContract(*contract); + if (!resolver.updateDeclaration(*m_globalContext->currentThis())) return false; + if (!resolver.updateDeclaration(*m_globalContext->currentSuper())) return false; + if (!resolver.resolveNamesAndTypes(*contract)) return false; + + // Note that we now reference contracts by their fully qualified names, and + // thus contracts can only conflict if declared in the same source file. This + // already causes a double-declaration error elsewhere, so we do not report + // an error here and instead silently drop any additional contracts we find. + + if (m_contracts.find(contract->fullyQualifiedName()) == m_contracts.end()) + m_contracts[contract->fullyQualifiedName()].contract = contract; + } - if (noErrors) - { - vector<ASTPointer<ASTNode>> ast; + TypeChecker typeChecker(m_evmVersion, m_errorReporter); for (Source const* source: m_sourceOrder) - ast.push_back(source->ast); + for (ASTPointer<ASTNode> const& node: source->ast->nodes()) + if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get())) + if (!typeChecker.checkTypeRequirements(*contract)) + noErrors = false; - if (!ViewPureChecker(ast, m_errorReporter).check()) - noErrors = false; - } + if (noErrors) + { + PostTypeChecker postTypeChecker(m_errorReporter); + for (Source const* source: m_sourceOrder) + if (!postTypeChecker.check(*source->ast)) + noErrors = false; + } - if (noErrors) + if (noErrors) + { + StaticAnalyzer staticAnalyzer(m_errorReporter); + for (Source const* source: m_sourceOrder) + if (!staticAnalyzer.analyze(*source->ast)) + noErrors = false; + } + + if (noErrors) + { + vector<ASTPointer<ASTNode>> ast; + for (Source const* source: m_sourceOrder) + ast.push_back(source->ast); + + if (!ViewPureChecker(ast, m_errorReporter).check()) + noErrors = false; + } + + if (noErrors) + { + SMTChecker smtChecker(m_errorReporter, m_smtQuery); + for (Source const* source: m_sourceOrder) + smtChecker.analyze(*source->ast); + } + } + catch(FatalError const&) { - SMTChecker smtChecker(m_errorReporter, m_smtQuery); - for (Source const* source: m_sourceOrder) - smtChecker.analyze(*source->ast); + if (m_errorReporter.errors().empty()) + throw; // Something is weird here, rather throw again. + noErrors = false; } if (noErrors) diff --git a/libsolidity/interface/ErrorReporter.cpp b/libsolidity/interface/ErrorReporter.cpp index e6171756..368e25e0 100644 --- a/libsolidity/interface/ErrorReporter.cpp +++ b/libsolidity/interface/ErrorReporter.cpp @@ -61,6 +61,9 @@ void ErrorReporter::warning( void ErrorReporter::error(Error::Type _type, SourceLocation const& _location, string const& _description) { + if (checkForExcessiveErrors(_type)) + return; + auto err = make_shared<Error>(_type); *err << errinfo_sourceLocation(_location) << @@ -71,6 +74,9 @@ void ErrorReporter::error(Error::Type _type, SourceLocation const& _location, st void ErrorReporter::error(Error::Type _type, SourceLocation const& _location, SecondarySourceLocation const& _secondaryLocation, string const& _description) { + if (checkForExcessiveErrors(_type)) + return; + auto err = make_shared<Error>(_type); *err << errinfo_sourceLocation(_location) << @@ -80,6 +86,37 @@ void ErrorReporter::error(Error::Type _type, SourceLocation const& _location, Se m_errorList.push_back(err); } +bool ErrorReporter::checkForExcessiveErrors(Error::Type _type) +{ + if (_type == Error::Type::Warning) + { + m_warningCount++; + + if (m_warningCount == c_maxWarningsAllowed) + { + auto err = make_shared<Error>(Error::Type::Warning); + *err << errinfo_comment("There are more than 256 warnings. Ignoring the rest."); + m_errorList.push_back(err); + } + + if (m_warningCount >= c_maxWarningsAllowed) + return true; + } + else + { + m_errorCount++; + + if (m_errorCount > c_maxErrorsAllowed) + { + auto err = make_shared<Error>(Error::Type::Warning); + *err << errinfo_comment("There are more than 256 errors. Aborting."); + m_errorList.push_back(err); + BOOST_THROW_EXCEPTION(FatalError()); + } + } + + return false; +} void ErrorReporter::fatalError(Error::Type _type, SourceLocation const& _location, string const& _description) { diff --git a/libsolidity/interface/ErrorReporter.h b/libsolidity/interface/ErrorReporter.h index a87db21d..d1a0030f 100644 --- a/libsolidity/interface/ErrorReporter.h +++ b/libsolidity/interface/ErrorReporter.h @@ -102,7 +102,16 @@ private: SourceLocation const& _location = SourceLocation(), std::string const& _description = std::string()); + // @returns true if error shouldn't be stored + bool checkForExcessiveErrors(Error::Type _type); + ErrorList& m_errorList; + + unsigned m_errorCount = 0; + unsigned m_warningCount = 0; + + const unsigned c_maxWarningsAllowed = 256; + const unsigned c_maxErrorsAllowed = 256; }; diff --git a/test/libsolidity/syntaxTests/more_than_256_declarationerrors.sol b/test/libsolidity/syntaxTests/more_than_256_declarationerrors.sol new file mode 100644 index 00000000..36305977 --- /dev/null +++ b/test/libsolidity/syntaxTests/more_than_256_declarationerrors.sol @@ -0,0 +1,524 @@ +contract C { + function f() { + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + b = 5; + } +} +// ---- +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// DeclarationError: Undeclared identifier. +// Warning: There are more than 256 errors. Aborting. diff --git a/test/libsolidity/syntaxTests/more_than_256_syntaxerrors.sol b/test/libsolidity/syntaxTests/more_than_256_syntaxerrors.sol new file mode 100644 index 00000000..66e185fa --- /dev/null +++ b/test/libsolidity/syntaxTests/more_than_256_syntaxerrors.sol @@ -0,0 +1,524 @@ +contract C { + function f() { + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + continue; + } +} +// ---- +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// SyntaxError: "continue" has to be in a "for" or "while" loop. +// Warning: There are more than 256 errors. Aborting. |