├── .circleci └── config.yml ├── .dockerignore ├── .editorconfig ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── general.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .travis.yml ├── .vscode └── settings.json ├── CMakeLists.txt ├── CODE_OF_CONDUCT.md ├── CODING_STYLE.md ├── CONTRIBUTING.md ├── Changelog.md ├── LICENSE.txt ├── README.md ├── ReleaseChecklist.md ├── appveyor.yml ├── cmake ├── EthBuildInfo.cmake ├── EthCcache.cmake ├── EthCheckCXXCompilerFlag.cmake ├── EthCompilerSettings.cmake ├── EthDependencies.cmake ├── EthOptions.cmake ├── EthPolicy.cmake ├── EthToolchains.cmake ├── EthUtils.cmake ├── FindCLN.cmake ├── FindCVC4.cmake ├── FindGMP.cmake ├── FindZ3.cmake ├── SmartAceOptions.cmake ├── jsoncpp.cmake ├── scripts │ └── buildinfo.cmake ├── templates │ ├── BuildInfo.h.in │ └── license.h.in └── toolchains │ ├── cxx17.cmake │ ├── default.cmake │ └── libfuzzer.cmake ├── cmodelres ├── CMakeLists.txt ├── Interactive.cmake ├── Klee.cmake ├── LibFuzzer.cmake ├── Seahorn.cmake └── yaml │ ├── sea.bv.yaml │ ├── sea.cex.yaml │ ├── sea.common.yaml │ └── sea.nlia.yaml ├── codecov.yml ├── docker ├── README.md ├── smartace-build-core.Dockerfile ├── smartace-build-klee.Dockerfile └── smartace.Dockerfile ├── docs ├── 050-breaking-changes.rst ├── Makefile ├── _static │ └── css │ │ └── custom.css ├── _templates │ └── layout.html ├── abi-spec.rst ├── assembly.rst ├── bugs.json ├── bugs.rst ├── bugs_by_version.json ├── common-patterns.rst ├── conf.py ├── contracts.rst ├── contracts │ ├── abstract-contracts.rst │ ├── constant-state-variables.rst │ ├── creating-contracts.rst │ ├── events.rst │ ├── function-modifiers.rst │ ├── functions.rst │ ├── inheritance.rst │ ├── interfaces.rst │ ├── libraries.rst │ ├── using-for.rst │ └── visibility-and-getters.rst ├── contributing.rst ├── control-structures.rst ├── examples │ ├── blind-auction.rst │ ├── micropayment.rst │ ├── modular.rst │ ├── safe-remote.rst │ └── voting.rst ├── grammar.txt ├── index.rst ├── installing-solidity.rst ├── introduction-to-smart-contracts.rst ├── layout-of-source-files.rst ├── lll.rst ├── logo.svg ├── make.bat ├── metadata.rst ├── miscellaneous.rst ├── natspec-format.rst ├── requirements.txt ├── resources.rst ├── security-considerations.rst ├── solidity-by-example.rst ├── solidity-in-depth.rst ├── structure-of-a-contract.rst ├── style-guide.rst ├── types.rst ├── types │ ├── conversion.rst │ ├── mapping-types.rst │ ├── operators.rst │ ├── reference-types.rst │ └── value-types.rst ├── units-and-global-variables.rst ├── using-the-compiler.rst └── yul.rst ├── libdevcore ├── Algorithms.h ├── AnsiColorized.h ├── Assertions.h ├── CMakeLists.txt ├── Common.h ├── CommonData.cpp ├── CommonData.h ├── CommonIO.cpp ├── CommonIO.h ├── Exceptions.cpp ├── Exceptions.h ├── FixedHash.h ├── IndentedWriter.cpp ├── IndentedWriter.h ├── IpfsHash.cpp ├── IpfsHash.h ├── JSON.cpp ├── JSON.h ├── Keccak256.cpp ├── Keccak256.h ├── Result.h ├── StringUtils.cpp ├── StringUtils.h ├── SwarmHash.cpp ├── SwarmHash.h ├── UTF8.cpp ├── UTF8.h ├── Visitor.h ├── Whiskers.cpp ├── Whiskers.h ├── picosha2.h └── vector_ref.h ├── libevmasm ├── Assembly.cpp ├── Assembly.h ├── AssemblyItem.cpp ├── AssemblyItem.h ├── BlockDeduplicator.cpp ├── BlockDeduplicator.h ├── CMakeLists.txt ├── CommonSubexpressionEliminator.cpp ├── CommonSubexpressionEliminator.h ├── ConstantOptimiser.cpp ├── ConstantOptimiser.h ├── ControlFlowGraph.cpp ├── ControlFlowGraph.h ├── Exceptions.h ├── ExpressionClasses.cpp ├── ExpressionClasses.h ├── GasMeter.cpp ├── GasMeter.h ├── Instruction.cpp ├── Instruction.h ├── JumpdestRemover.cpp ├── JumpdestRemover.h ├── KnownState.cpp ├── KnownState.h ├── LinkerObject.cpp ├── LinkerObject.h ├── PathGasMeter.cpp ├── PathGasMeter.h ├── PeepholeOptimiser.cpp ├── PeepholeOptimiser.h ├── RuleList.h ├── SemanticInformation.cpp ├── SemanticInformation.h ├── SimplificationRule.h ├── SimplificationRules.cpp └── SimplificationRules.h ├── liblangutil ├── CMakeLists.txt ├── CharStream.cpp ├── CharStream.h ├── Common.h ├── EVMVersion.h ├── ErrorReporter.cpp ├── ErrorReporter.h ├── Exceptions.cpp ├── Exceptions.h ├── ParserBase.cpp ├── ParserBase.h ├── Scanner.cpp ├── Scanner.h ├── SemVerHandler.cpp ├── SemVerHandler.h ├── SourceLocation.h ├── SourceReferenceExtractor.cpp ├── SourceReferenceExtractor.h ├── SourceReferenceFormatter.cpp ├── SourceReferenceFormatter.h ├── SourceReferenceFormatterHuman.cpp ├── SourceReferenceFormatterHuman.h ├── Token.cpp ├── Token.h └── UndefMacros.h ├── liblll ├── CMakeLists.txt ├── CodeFragment.cpp ├── CodeFragment.h ├── Compiler.cpp ├── Compiler.h ├── CompilerState.cpp ├── CompilerState.h ├── Exceptions.h ├── Parser.cpp └── Parser.h ├── libsolc ├── CMakeLists.txt ├── libsolc.cpp └── libsolc.h ├── libsolidity ├── CMakeLists.txt ├── analysis │ ├── ConstantEvaluator.cpp │ ├── ConstantEvaluator.h │ ├── ContractLevelChecker.cpp │ ├── ContractLevelChecker.h │ ├── ControlFlowAnalyzer.cpp │ ├── ControlFlowAnalyzer.h │ ├── ControlFlowBuilder.cpp │ ├── ControlFlowBuilder.h │ ├── ControlFlowGraph.cpp │ ├── ControlFlowGraph.h │ ├── DeclarationContainer.cpp │ ├── DeclarationContainer.h │ ├── DocStringAnalyser.cpp │ ├── DocStringAnalyser.h │ ├── GlobalContext.cpp │ ├── GlobalContext.h │ ├── NameAndTypeResolver.cpp │ ├── NameAndTypeResolver.h │ ├── PostTypeChecker.cpp │ ├── PostTypeChecker.h │ ├── ReferencesResolver.cpp │ ├── ReferencesResolver.h │ ├── StaticAnalyzer.cpp │ ├── StaticAnalyzer.h │ ├── SyntaxChecker.cpp │ ├── SyntaxChecker.h │ ├── TypeChecker.cpp │ ├── TypeChecker.h │ ├── ViewPureChecker.cpp │ └── ViewPureChecker.h ├── ast │ ├── AST.cpp │ ├── AST.h │ ├── ASTAnnotations.cpp │ ├── ASTAnnotations.h │ ├── ASTEnums.h │ ├── ASTForward.h │ ├── ASTJsonConverter.cpp │ ├── ASTJsonConverter.h │ ├── ASTPrinter.cpp │ ├── ASTPrinter.h │ ├── ASTVisitor.h │ ├── AST_accept.h │ ├── ExperimentalFeatures.h │ ├── TypeProvider.cpp │ ├── TypeProvider.h │ ├── Types.cpp │ └── Types.h ├── codegen │ ├── ABIFunctions.cpp │ ├── ABIFunctions.h │ ├── ArrayUtils.cpp │ ├── ArrayUtils.h │ ├── Compiler.cpp │ ├── Compiler.h │ ├── CompilerContext.cpp │ ├── CompilerContext.h │ ├── CompilerUtils.cpp │ ├── CompilerUtils.h │ ├── ContractCompiler.cpp │ ├── ContractCompiler.h │ ├── ExpressionCompiler.cpp │ ├── ExpressionCompiler.h │ ├── LValue.cpp │ ├── LValue.h │ ├── MultiUseYulFunctionCollector.cpp │ ├── MultiUseYulFunctionCollector.h │ ├── YulUtilFunctions.cpp │ ├── YulUtilFunctions.h │ └── ir │ │ ├── IRGenerationContext.cpp │ │ ├── IRGenerationContext.h │ │ ├── IRGenerator.cpp │ │ ├── IRGenerator.h │ │ ├── IRGeneratorForStatements.cpp │ │ ├── IRGeneratorForStatements.h │ │ ├── IRLValue.cpp │ │ └── IRLValue.h ├── formal │ ├── CVC4Interface.cpp │ ├── CVC4Interface.h │ ├── EncodingContext.cpp │ ├── EncodingContext.h │ ├── SMTChecker.cpp │ ├── SMTChecker.h │ ├── SMTLib2Interface.cpp │ ├── SMTLib2Interface.h │ ├── SMTPortfolio.cpp │ ├── SMTPortfolio.h │ ├── SSAVariable.cpp │ ├── SSAVariable.h │ ├── SolverInterface.h │ ├── SymbolicTypes.cpp │ ├── SymbolicTypes.h │ ├── SymbolicVariables.cpp │ ├── SymbolicVariables.h │ ├── VariableUsage.cpp │ ├── VariableUsage.h │ ├── Z3Interface.cpp │ └── Z3Interface.h ├── interface │ ├── ABI.cpp │ ├── ABI.h │ ├── CompilerStack.cpp │ ├── CompilerStack.h │ ├── GasEstimator.cpp │ ├── GasEstimator.h │ ├── Natspec.cpp │ ├── Natspec.h │ ├── OptimiserSettings.h │ ├── ReadFile.h │ ├── StandardCompiler.cpp │ ├── StandardCompiler.h │ ├── Version.cpp │ └── Version.h ├── modelcheck │ ├── analysis │ │ ├── AbstractAddressDomain.cpp │ │ ├── AbstractAddressDomain.h │ │ ├── AllocationSites.cpp │ │ ├── AllocationSites.h │ │ ├── AnalysisStack.cpp │ │ ├── AnalysisStack.h │ │ ├── CallGraph.cpp │ │ ├── CallGraph.h │ │ ├── CallState.cpp │ │ ├── CallState.h │ │ ├── ContractRvAnalysis.cpp │ │ ├── ContractRvAnalysis.h │ │ ├── FunctionCall.cpp │ │ ├── FunctionCall.h │ │ ├── Inheritance.cpp │ │ ├── Inheritance.h │ │ ├── Library.cpp │ │ ├── Library.h │ │ ├── Mapping.cpp │ │ ├── Mapping.h │ │ ├── Primitives.cpp │ │ ├── Primitives.h │ │ ├── StringLookup.cpp │ │ ├── StringLookup.h │ │ ├── Structure.cpp │ │ ├── Structure.h │ │ ├── TaintAnalysis.cpp │ │ ├── TaintAnalysis.h │ │ ├── TightBundle.cpp │ │ ├── TightBundle.h │ │ ├── TypeAnalyzer.cpp │ │ ├── TypeAnalyzer.h │ │ ├── VariableScope.cpp │ │ └── VariableScope.h │ ├── cli │ │ ├── Bundle.cpp │ │ └── Bundle.h │ ├── codegen │ │ ├── Core.cpp │ │ ├── Core.h │ │ ├── Details.cpp │ │ ├── Details.h │ │ ├── Literals.cpp │ │ └── Literals.h │ ├── model │ │ ├── ADT.cpp │ │ ├── ADT.h │ │ ├── Block.h │ │ ├── Block_function.cpp │ │ ├── Block_general.cpp │ │ ├── Block_modifier.cpp │ │ ├── Ether.cpp │ │ ├── Ether.h │ │ ├── Expression.cpp │ │ ├── Expression.h │ │ ├── Function.cpp │ │ ├── Function.h │ │ ├── Mapping.cpp │ │ ├── Mapping.h │ │ ├── NondetSourceRegistry.cpp │ │ └── NondetSourceRegistry.h │ ├── scheduler │ │ ├── ActorModel.cpp │ │ ├── ActorModel.h │ │ ├── AddressSpace.cpp │ │ ├── AddressSpace.h │ │ ├── CompInvarGenerator.cpp │ │ ├── CompInvarGenerator.h │ │ ├── MainFunction.cpp │ │ ├── MainFunction.h │ │ ├── StateGenerator.cpp │ │ └── StateGenerator.h │ └── utils │ │ ├── AST.cpp │ │ ├── AST.h │ │ ├── AbstractAddressDomain.cpp │ │ ├── AbstractAddressDomain.h │ │ ├── CallState.cpp │ │ ├── CallState.h │ │ ├── CompilerMacros.h │ │ ├── Contract.cpp │ │ ├── Contract.h │ │ ├── Ether.cpp │ │ ├── Ether.h │ │ ├── Function.cpp │ │ ├── Function.h │ │ ├── General.h │ │ ├── KeyIterator.cpp │ │ ├── KeyIterator.h │ │ ├── LibVerify.cpp │ │ ├── LibVerify.h │ │ ├── Named.cpp │ │ ├── Named.h │ │ ├── Primitives.cpp │ │ ├── Primitives.h │ │ ├── Types.cpp │ │ └── Types.h └── parsing │ ├── DocStringParser.cpp │ ├── DocStringParser.h │ ├── Parser.cpp │ ├── Parser.h │ └── Token.h ├── libverify ├── CMakeLists.txt ├── verify.h ├── verify_interactive.cpp ├── verify_klee.c ├── verify_libfuzzer.cpp └── verify_seahorn.c ├── libyul ├── AsmAnalysis.cpp ├── AsmAnalysis.h ├── AsmAnalysisInfo.h ├── AsmData.h ├── AsmDataForward.h ├── AsmParser.cpp ├── AsmParser.h ├── AsmPrinter.cpp ├── AsmPrinter.h ├── AsmScope.cpp ├── AsmScope.h ├── AsmScopeFiller.cpp ├── AsmScopeFiller.h ├── AssemblyStack.cpp ├── AssemblyStack.h ├── CMakeLists.txt ├── CompilabilityChecker.cpp ├── CompilabilityChecker.h ├── Dialect.h ├── Exceptions.h ├── Object.cpp ├── Object.h ├── ObjectParser.cpp ├── ObjectParser.h ├── Utilities.cpp ├── Utilities.h ├── YulString.h ├── backends │ ├── evm │ │ ├── AbstractAssembly.h │ │ ├── AsmCodeGen.cpp │ │ ├── AsmCodeGen.h │ │ ├── EVMAssembly.cpp │ │ ├── EVMAssembly.h │ │ ├── EVMCodeTransform.cpp │ │ ├── EVMCodeTransform.h │ │ ├── EVMDialect.cpp │ │ ├── EVMDialect.h │ │ ├── EVMObjectCompiler.cpp │ │ ├── EVMObjectCompiler.h │ │ ├── NoOutputAssembly.cpp │ │ └── NoOutputAssembly.h │ └── wasm │ │ ├── EWasmAST.h │ │ ├── EWasmCodeTransform.cpp │ │ ├── EWasmCodeTransform.h │ │ ├── EWasmObjectCompiler.cpp │ │ ├── EWasmObjectCompiler.h │ │ ├── EWasmToText.cpp │ │ ├── EWasmToText.h │ │ ├── WasmDialect.cpp │ │ ├── WasmDialect.h │ │ ├── WordSizeTransform.cpp │ │ └── WordSizeTransform.h └── optimiser │ ├── ASTCopier.cpp │ ├── ASTCopier.h │ ├── ASTWalker.cpp │ ├── ASTWalker.h │ ├── BlockFlattener.cpp │ ├── BlockFlattener.h │ ├── CommonSubexpressionEliminator.cpp │ ├── CommonSubexpressionEliminator.h │ ├── ControlFlowSimplifier.cpp │ ├── ControlFlowSimplifier.h │ ├── DataFlowAnalyzer.cpp │ ├── DataFlowAnalyzer.h │ ├── DeadCodeEliminator.cpp │ ├── DeadCodeEliminator.h │ ├── Disambiguator.cpp │ ├── Disambiguator.h │ ├── EquivalentFunctionCombiner.cpp │ ├── EquivalentFunctionCombiner.h │ ├── EquivalentFunctionDetector.cpp │ ├── EquivalentFunctionDetector.h │ ├── ExpressionInliner.cpp │ ├── ExpressionInliner.h │ ├── ExpressionJoiner.cpp │ ├── ExpressionJoiner.h │ ├── ExpressionSimplifier.cpp │ ├── ExpressionSimplifier.h │ ├── ExpressionSplitter.cpp │ ├── ExpressionSplitter.h │ ├── ForLoopInitRewriter.cpp │ ├── ForLoopInitRewriter.h │ ├── FullInliner.cpp │ ├── FullInliner.h │ ├── FunctionGrouper.cpp │ ├── FunctionGrouper.h │ ├── FunctionHoister.cpp │ ├── FunctionHoister.h │ ├── InlinableExpressionFunctionFinder.cpp │ ├── InlinableExpressionFunctionFinder.h │ ├── MainFunction.cpp │ ├── MainFunction.h │ ├── Metrics.cpp │ ├── Metrics.h │ ├── NameCollector.cpp │ ├── NameCollector.h │ ├── NameDispenser.cpp │ ├── NameDispenser.h │ ├── OptimizerUtilities.cpp │ ├── OptimizerUtilities.h │ ├── README.md │ ├── RedundantAssignEliminator.cpp │ ├── RedundantAssignEliminator.h │ ├── Rematerialiser.cpp │ ├── Rematerialiser.h │ ├── SSAReverser.cpp │ ├── SSAReverser.h │ ├── SSATransform.cpp │ ├── SSATransform.h │ ├── SSAValueTracker.cpp │ ├── SSAValueTracker.h │ ├── Semantics.cpp │ ├── Semantics.h │ ├── SimplificationRules.cpp │ ├── SimplificationRules.h │ ├── StackCompressor.cpp │ ├── StackCompressor.h │ ├── StructuralSimplifier.cpp │ ├── StructuralSimplifier.h │ ├── Substitution.cpp │ ├── Substitution.h │ ├── Suite.cpp │ ├── Suite.h │ ├── SyntacticalEquality.cpp │ ├── SyntacticalEquality.h │ ├── UnusedPruner.cpp │ ├── UnusedPruner.h │ ├── VarDeclInitializer.cpp │ ├── VarDeclInitializer.h │ ├── VarNameCleaner.cpp │ └── VarNameCleaner.h ├── lllc ├── CMakeLists.txt └── main.cpp ├── scripts ├── Dockerfile ├── Dockerfile_alpine ├── aleth_with_log.sh ├── build.sh ├── build_emscripten.sh ├── bytecodecompare │ ├── deploy_key.enc │ ├── prepare_report.py │ ├── storebytecode.bat │ └── storebytecode.sh ├── check_style.sh ├── codespell_whitelist.txt ├── cpp-ethereum │ ├── build.sh │ ├── eth_artful.docker │ └── eth_trusty.docker ├── create_source_tarball.sh ├── docker_build.sh ├── docker_deploy.sh ├── docker_deploy_manual.sh ├── docs.sh ├── download_ossfuzz_corpus.sh ├── extract_test_cases.py ├── fix_homebrew_paths_in_standalone_zip.py ├── get_version.sh ├── install_cmake.sh ├── install_deps.bat ├── install_deps.cmake ├── install_deps.sh ├── install_libfuzzer.sh ├── install_lpm.sh ├── install_obsolete_jsoncpp_1_7_4.sh ├── isolate_tests.py ├── isoltest.sh ├── regressions.py ├── release.bat ├── release.sh ├── release_emscripten.sh ├── release_ppa.sh ├── report_errors.sh ├── soltest.sh ├── test_emscripten.sh ├── tests.sh ├── travis-emscripten │ ├── build_emscripten.sh │ ├── deploy_key.enc │ ├── install_deps.sh │ └── publish_binary.sh ├── uniqueErrors.sh └── update_bugs_by_version.py ├── snap └── snapcraft.yaml ├── solc ├── CMakeLists.txt ├── CommandLineInterface.cpp ├── CommandLineInterface.h └── main.cpp ├── solidity.md ├── test ├── CMakeLists.txt ├── Common.cpp ├── Common.h ├── ExecutionFramework.cpp ├── ExecutionFramework.h ├── InteractiveTests.h ├── Metadata.cpp ├── Metadata.h ├── Options.cpp ├── Options.h ├── RPCSession.cpp ├── RPCSession.h ├── TestCase.cpp ├── TestCase.h ├── boostTest.cpp ├── buglistTests.js ├── buglist_test_vectors.md ├── cmdlineTests.sh ├── cmdlineTests │ ├── object_compiler │ │ ├── args │ │ ├── err │ │ ├── exit │ │ ├── input.sol │ │ └── output │ ├── standard_default_success │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_irOptimized_requested │ │ ├── input.json │ │ └── output.json │ ├── standard_ir_requested │ │ ├── input.json │ │ └── output.json │ ├── standard_method_identifiers_requested │ │ ├── input.json │ │ └── output.json │ ├── standard_missing_key_useLiteralContent │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_only_ast_requested │ │ ├── input.json │ │ └── output.json │ ├── standard_optimizer_invalid_detail_type │ │ ├── input.json │ │ └── output.json │ ├── standard_optimizer_invalid_details │ │ ├── input.json │ │ └── output.json │ ├── standard_optimizer_yul │ │ ├── input.json │ │ └── output.json │ ├── standard_optimizer_yulDetails │ │ ├── input.json │ │ └── output.json │ ├── standard_optimizer_yulDetails_no_object │ │ ├── input.json │ │ └── output.json │ ├── standard_optimizer_yulDetails_without_yul │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_key_auxiliary_input │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_key_metadata │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_key_optimizer │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_key_root │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_key_settings │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_key_source │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_auxiliary_input │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_auxiliary_input_smtlib2responses │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_auxiliary_input_smtlib2responses_member │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_metadata │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_optimizer │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_output_selection │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_output_selection_contract │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_output_selection_file │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_output_selection_output │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_remappings │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_remappings_entry │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_root │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_settings │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_source │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_sources │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_wrong_type_useLiteralContent │ │ ├── exit │ │ ├── input.json │ │ └── output.json │ ├── standard_yul │ │ ├── input.json │ │ └── output.json │ ├── standard_yul_embedded_object_name │ │ ├── input.json │ │ └── output.json │ ├── standard_yul_invalid_object_name │ │ ├── input.json │ │ └── output.json │ ├── standard_yul_multiple_files │ │ ├── input.json │ │ └── output.json │ ├── standard_yul_multiple_files_selected │ │ ├── input.json │ │ └── output.json │ ├── standard_yul_object │ │ ├── input.json │ │ └── output.json │ ├── standard_yul_object_name │ │ ├── input.json │ │ └── output.json │ ├── standard_yul_optimized │ │ ├── input.json │ │ └── output.json │ ├── strict_asm_jump │ │ ├── args │ │ ├── err │ │ ├── exit │ │ └── input.sol │ ├── too_long_line │ │ ├── err │ │ ├── exit │ │ └── input.sol │ ├── too_long_line_both_sides_short │ │ ├── err │ │ ├── exit │ │ └── input.sol │ ├── too_long_line_edge_in │ │ ├── err │ │ ├── exit │ │ └── input.sol │ ├── too_long_line_edge_out │ │ ├── err │ │ ├── exit │ │ └── input.sol │ ├── too_long_line_left_short │ │ ├── err │ │ ├── exit │ │ └── input.sol │ ├── too_long_line_multiline │ │ ├── err │ │ ├── exit │ │ └── input.sol │ ├── too_long_line_right_short │ │ ├── err │ │ ├── exit │ │ └── input.sol │ ├── yul_stack_opt │ │ ├── args │ │ ├── err │ │ ├── input.sol │ │ └── output │ └── yul_stack_opt_disabled │ │ ├── args │ │ ├── err │ │ ├── exit │ │ ├── input.sol │ │ └── output ├── compilationTests │ ├── MultiSigWallet │ │ ├── Factory.sol │ │ ├── LICENSE │ │ ├── MultiSigWallet.sol │ │ ├── MultiSigWalletFactory.sol │ │ ├── MultiSigWalletWithDailyLimit.sol │ │ ├── MultiSigWalletWithDailyLimitFactory.sol │ │ ├── README.md │ │ └── TestToken.sol │ ├── README.md │ ├── corion │ │ ├── LICENSE │ │ ├── README.md │ │ ├── announcementTypes.sol │ │ ├── ico.sol │ │ ├── module.sol │ │ ├── moduleHandler.sol │ │ ├── multiOwner.sol │ │ ├── owned.sol │ │ ├── premium.sol │ │ ├── provider.sol │ │ ├── publisher.sol │ │ ├── safeMath.sol │ │ ├── schelling.sol │ │ ├── token.sol │ │ └── tokenDB.sol │ ├── gnosis │ │ ├── Events │ │ │ ├── CategoricalEvent.sol │ │ │ ├── Event.sol │ │ │ ├── EventFactory.sol │ │ │ └── ScalarEvent.sol │ │ ├── LICENSE │ │ ├── MarketMakers │ │ │ ├── LMSRMarketMaker.sol │ │ │ └── MarketMaker.sol │ │ ├── Markets │ │ │ ├── Campaign.sol │ │ │ ├── CampaignFactory.sol │ │ │ ├── Market.sol │ │ │ ├── MarketFactory.sol │ │ │ ├── StandardMarket.sol │ │ │ └── StandardMarketFactory.sol │ │ ├── Migrations.sol │ │ ├── Oracles │ │ │ ├── CentralizedOracle.sol │ │ │ ├── CentralizedOracleFactory.sol │ │ │ ├── DifficultyOracle.sol │ │ │ ├── DifficultyOracleFactory.sol │ │ │ ├── FutarchyOracle.sol │ │ │ ├── FutarchyOracleFactory.sol │ │ │ ├── MajorityOracle.sol │ │ │ ├── MajorityOracleFactory.sol │ │ │ ├── Oracle.sol │ │ │ ├── SignedMessageOracle.sol │ │ │ ├── SignedMessageOracleFactory.sol │ │ │ ├── UltimateOracle.sol │ │ │ └── UltimateOracleFactory.sol │ │ ├── README.md │ │ ├── Tokens │ │ │ ├── EtherToken.sol │ │ │ ├── OutcomeToken.sol │ │ │ ├── StandardToken.sol │ │ │ └── Token.sol │ │ └── Utils │ │ │ └── Math.sol │ ├── milestonetracker │ │ ├── LICENSE │ │ ├── MilestoneTracker.sol │ │ ├── README.md │ │ └── RLP.sol │ └── stringutils │ │ ├── LICENSE │ │ ├── README.md │ │ └── strings.sol ├── contracts │ ├── AuctionRegistrar.cpp │ ├── ContractInterface.h │ ├── FixedFeeRegistrar.cpp │ └── Wallet.cpp ├── externalTests.sh ├── externalTests │ ├── colony.sh │ ├── common.sh │ ├── gnosis.sh │ └── zeppelin.sh ├── libdevcore │ ├── Checksum.cpp │ ├── CommonData.cpp │ ├── IndentedWriter.cpp │ ├── IpfsHash.cpp │ ├── IterateReplacing.cpp │ ├── JSON.cpp │ ├── StringUtils.cpp │ ├── SwarmHash.cpp │ ├── UTF8.cpp │ └── Whiskers.cpp ├── libevmasm │ ├── Assembler.cpp │ └── Optimiser.cpp ├── liblangutil │ └── SourceLocation.cpp ├── liblll │ ├── Compiler.cpp │ ├── EndToEndTest.cpp │ ├── ExecutionFramework.cpp │ ├── ExecutionFramework.h │ ├── LLL_ENS.cpp │ ├── LLL_ERC20.cpp │ └── Parser.cpp ├── libsolidity │ ├── ABIDecoderTests.cpp │ ├── ABIEncoderTests.cpp │ ├── ABITestsCommon.h │ ├── ASTJSON │ │ ├── address_payable.json │ │ ├── address_payable.sol │ │ ├── address_payable_legacy.json │ │ ├── array_type_name.json │ │ ├── array_type_name.sol │ │ ├── array_type_name_legacy.json │ │ ├── constructor.json │ │ ├── constructor.sol │ │ ├── constructor_legacy.json │ │ ├── documentation.json │ │ ├── documentation.sol │ │ ├── documentation_legacy.json │ │ ├── enum_value.json │ │ ├── enum_value.sol │ │ ├── enum_value_legacy.json │ │ ├── event_definition.json │ │ ├── event_definition.sol │ │ ├── event_definition_legacy.json │ │ ├── fallback.json │ │ ├── fallback.sol │ │ ├── fallback_legacy.json │ │ ├── fallback_payable.json │ │ ├── fallback_payable.sol │ │ ├── fallback_payable_legacy.json │ │ ├── function_type.json │ │ ├── function_type.sol │ │ ├── function_type_legacy.json │ │ ├── inheritance_specifier.json │ │ ├── inheritance_specifier.sol │ │ ├── inheritance_specifier_legacy.json │ │ ├── long_type_name_binary_operation.json │ │ ├── long_type_name_binary_operation.sol │ │ ├── long_type_name_binary_operation_legacy.json │ │ ├── long_type_name_identifier.json │ │ ├── long_type_name_identifier.sol │ │ ├── long_type_name_identifier_legacy.json │ │ ├── modifier_definition.json │ │ ├── modifier_definition.sol │ │ ├── modifier_definition_legacy.json │ │ ├── modifier_invocation.json │ │ ├── modifier_invocation.sol │ │ ├── modifier_invocation_legacy.json │ │ ├── non_utf8.json │ │ ├── non_utf8.sol │ │ ├── non_utf8_legacy.json │ │ ├── placeholder_statement.json │ │ ├── placeholder_statement.sol │ │ ├── placeholder_statement_legacy.json │ │ ├── short_type_name.json │ │ ├── short_type_name.sol │ │ ├── short_type_name_legacy.json │ │ ├── short_type_name_ref.json │ │ ├── short_type_name_ref.sol │ │ ├── short_type_name_ref_legacy.json │ │ ├── smoke.json │ │ ├── smoke.sol │ │ ├── smoke_legacy.json │ │ ├── source_location.json │ │ ├── source_location.sol │ │ ├── source_location_legacy.json │ │ ├── using_for_directive.json │ │ ├── using_for_directive.sol │ │ └── using_for_directive_legacy.json │ ├── ASTJSONTest.cpp │ ├── ASTJSONTest.h │ ├── AnalysisFramework.cpp │ ├── AnalysisFramework.h │ ├── Assembly.cpp │ ├── ErrorCheck.cpp │ ├── ErrorCheck.h │ ├── GasCosts.cpp │ ├── GasMeter.cpp │ ├── GasTest.cpp │ ├── GasTest.h │ ├── Imports.cpp │ ├── InlineAssembly.cpp │ ├── LibSolc.cpp │ ├── Metadata.cpp │ ├── SMTChecker.cpp │ ├── SMTCheckerJSONTest.cpp │ ├── SMTCheckerJSONTest.h │ ├── SemVerMatcher.cpp │ ├── SemanticTest.cpp │ ├── SemanticTest.h │ ├── SolidityABIJSON.cpp │ ├── SolidityCompiler.cpp │ ├── SolidityEndToEndTest.cpp │ ├── SolidityExecutionFramework.cpp │ ├── SolidityExecutionFramework.h │ ├── SolidityExpressionCompiler.cpp │ ├── SolidityNameAndTypeResolution.cpp │ ├── SolidityNatspecJSON.cpp │ ├── SolidityOptimizer.cpp │ ├── SolidityParser.cpp │ ├── SolidityScanner.cpp │ ├── SolidityTypes.cpp │ ├── StandardCompiler.cpp │ ├── SyntaxTest.cpp │ ├── SyntaxTest.h │ ├── ViewPureChecker.cpp │ ├── gasTests │ │ ├── abiv2.sol │ │ ├── abiv2_optimised.sol │ │ ├── data_storage.sol │ │ ├── dispatch_large.sol │ │ ├── dispatch_large_optimised.sol │ │ ├── dispatch_medium.sol │ │ ├── dispatch_medium_optimised.sol │ │ ├── dispatch_small.sol │ │ └── dispatch_small_optimised.sol │ ├── modelcheck │ │ ├── EndToEndTests.cpp │ │ ├── analysis │ │ │ ├── AbstractAddressDomainTests.cpp │ │ │ ├── AllocationSitesTests.cpp │ │ │ ├── AnalysisStackTests.cpp │ │ │ ├── CallGraphTests.cpp │ │ │ ├── CallStateTests.cpp │ │ │ ├── ContractRvAnalysisTests.cpp │ │ │ ├── FunctionCallTests.cpp │ │ │ ├── InheritanceTests.cpp │ │ │ ├── LibraryTests.cpp │ │ │ ├── MappingTests.cpp │ │ │ ├── PrimitivesTests.cpp │ │ │ ├── StructureTests.cpp │ │ │ ├── TaintAnalysisTests.cpp │ │ │ ├── TightBundleTests.cpp │ │ │ ├── TypeNamesTests.cpp │ │ │ └── VariableScopeTests.cpp │ │ ├── cli │ │ │ └── BundleTests.cpp │ │ ├── codegen │ │ │ └── DetailsTests.cpp │ │ ├── model │ │ │ ├── ADTTests.cpp │ │ │ ├── BlockTests.cpp │ │ │ ├── EtherTests.cpp │ │ │ ├── ExpressionTests.cpp │ │ │ ├── FunctionTests.cpp │ │ │ ├── MappingTests.cpp │ │ │ └── NondetSourceRegistryTest.cpp │ │ └── utils │ │ │ ├── ASTTests.cpp │ │ │ ├── AbstractAddressDomainTests.cpp │ │ │ ├── CallStateTests.cpp │ │ │ ├── ContractTests.cpp │ │ │ ├── EtherTests.cpp │ │ │ ├── FunctionTests.cpp │ │ │ ├── GeneralTests.cpp │ │ │ ├── KeyIteratorTests.cpp │ │ │ ├── LibVerifyTests.cpp │ │ │ ├── NamedTests.cpp │ │ │ ├── PrimitiveTests.cpp │ │ │ └── TypesTests.cpp │ ├── semanticTests │ │ ├── abiEncoderV2 │ │ │ ├── calldata_array.sol │ │ │ ├── calldata_array_dynamic.sol │ │ │ ├── calldata_array_dynamic_index_access.sol │ │ │ ├── calldata_array_dynamic_static_dynamic.sol │ │ │ ├── calldata_array_function_types.sol │ │ │ ├── calldata_array_multi_dynamic.sol │ │ │ ├── calldata_array_static.sol │ │ │ ├── calldata_array_static_dynamic_static.sol │ │ │ ├── calldata_array_static_index_access.sol │ │ │ ├── calldata_array_struct_dynamic.sol │ │ │ ├── calldata_array_two_dynamic.sol │ │ │ ├── calldata_array_two_static.sol │ │ │ ├── calldata_struct_dynamic.sol │ │ │ ├── calldata_struct_simple.sol │ │ │ └── cleanup │ │ │ │ ├── address.sol │ │ │ │ ├── bool.sol │ │ │ │ ├── bytesx.sol │ │ │ │ ├── dynamic_array.sol │ │ │ │ ├── function.sol │ │ │ │ ├── intx.sol │ │ │ │ ├── simple_struct.sol │ │ │ │ ├── static_array.sol │ │ │ │ └── uintx.sol │ │ ├── asmForLoop │ │ │ ├── for_loop_break.sol │ │ │ ├── for_loop_continue.sol │ │ │ └── for_loop_nested.sol │ │ ├── ecrecover │ │ │ ├── ecrecover.sol │ │ │ ├── ecrecover_abiV2.sol │ │ │ ├── failing_ecrecover_invalid_input.sol │ │ │ ├── failing_ecrecover_invalid_input_asm.sol │ │ │ └── failing_ecrecover_invalid_input_proper.sol │ │ ├── functionCall │ │ │ ├── base_base_overload.sol │ │ │ ├── base_overload.sol │ │ │ └── named_args_overload.sol │ │ ├── shifts.sol │ │ ├── smoke_test.sol │ │ ├── smoke_test_alignment.sol │ │ ├── smoke_test_multiline.sol │ │ ├── smoke_test_multiline_comments.sol │ │ ├── specialFunctions │ │ │ └── abi_functions_member_access.sol │ │ ├── structs │ │ │ ├── calldata │ │ │ │ ├── dynamic_nested.sol │ │ │ │ └── dynamically_encoded.sol │ │ │ └── conversion │ │ │ │ ├── recursive_storage_memory.sol │ │ │ │ └── recursive_storage_memory_complex.sol │ │ ├── uninitializedFunctionPointer │ │ │ ├── invalidInConstructor.sol │ │ │ ├── invalidStoredInConstructor.sol │ │ │ ├── store2.sol │ │ │ └── storeInConstructor.sol │ │ └── viaYul │ │ │ ├── assert.sol │ │ │ ├── assert_and_require.sol │ │ │ ├── comparison.sol │ │ │ ├── conversion │ │ │ ├── explicit_cast_assignment.sol │ │ │ ├── explicit_cast_function_call.sol │ │ │ ├── explicit_cast_local_assignment.sol │ │ │ ├── implicit_cast_assignment.sol │ │ │ ├── implicit_cast_function_call.sol │ │ │ └── implicit_cast_local_assignment.sol │ │ │ ├── detect_add_overflow.yul │ │ │ ├── erc20.sol │ │ │ ├── function_entry_checks.sol │ │ │ ├── if.sol │ │ │ ├── local_address_assignment.sol │ │ │ ├── local_assignment.sol │ │ │ ├── local_bool_assignment.sol │ │ │ ├── loops │ │ │ ├── break.sol │ │ │ ├── continue.sol │ │ │ ├── return.sol │ │ │ └── simple.sol │ │ │ ├── msg_sender.sol │ │ │ ├── require.sol │ │ │ ├── return.sol │ │ │ ├── return_and_convert.sol │ │ │ ├── short_circuit.sol │ │ │ ├── simple_assignment.sol │ │ │ ├── simple_inline_asm.sol │ │ │ ├── smoke_test.sol │ │ │ ├── storage │ │ │ ├── mappings.sol │ │ │ ├── packed_storage.sol │ │ │ └── simple_storage.sol │ │ │ ├── string_literals.sol │ │ │ ├── various_inline_asm.sol │ │ │ └── virtual_functions.sol │ ├── smtCheckerTests │ │ ├── complex │ │ │ ├── MerkleProof.sol │ │ │ ├── slither │ │ │ │ ├── const_state_variables.sol │ │ │ │ ├── data_dependency.sol │ │ │ │ └── external_function.sol │ │ │ ├── warn_on_struct.sol │ │ │ └── warn_on_typecast.sol │ │ ├── control_flow │ │ │ ├── assignment_in_declaration.sol │ │ │ ├── branches_assert_condition_1.sol │ │ │ ├── branches_assert_condition_2.sol │ │ │ ├── branches_merge_variables_1.sol │ │ │ ├── branches_merge_variables_2.sol │ │ │ ├── branches_merge_variables_3.sol │ │ │ ├── branches_merge_variables_4.sol │ │ │ ├── branches_merge_variables_5.sol │ │ │ ├── branches_merge_variables_6.sol │ │ │ ├── function_call_inside_branch.sol │ │ │ ├── function_call_inside_branch_2.sol │ │ │ ├── function_call_inside_branch_3.sol │ │ │ ├── function_call_inside_branch_4.sol │ │ │ ├── function_call_inside_else_branch.sol │ │ │ ├── function_call_inside_modifier_branch.sol │ │ │ ├── function_call_inside_placeholder_inside_modifier_branch.sol │ │ │ ├── short_circuit_and.sol │ │ │ ├── short_circuit_and_fail.sol │ │ │ ├── short_circuit_and_inside_branch.sol │ │ │ ├── short_circuit_and_need_both.sol │ │ │ ├── short_circuit_and_need_both_fail.sol │ │ │ ├── short_circuit_and_touched.sol │ │ │ ├── short_circuit_and_touched_function.sol │ │ │ ├── short_circuit_or.sol │ │ │ ├── short_circuit_or_fail.sol │ │ │ ├── short_circuit_or_inside_branch.sol │ │ │ ├── short_circuit_or_need_both.sol │ │ │ ├── short_circuit_or_need_both_fail.sol │ │ │ ├── short_circuit_or_touched.sol │ │ │ ├── short_circuit_or_touched_function.sol │ │ │ ├── ways_to_merge_variables_1.sol │ │ │ ├── ways_to_merge_variables_2.sol │ │ │ └── ways_to_merge_variables_3.sol │ │ ├── functions │ │ │ ├── constructor_hierarchy.sol │ │ │ ├── constructor_hierarchy_2.sol │ │ │ ├── function_call_does_not_clear_local_vars.sol │ │ │ ├── function_inline_chain.sol │ │ │ ├── function_inside_branch_modify_state_var.sol │ │ │ ├── function_inside_branch_modify_state_var_2.sol │ │ │ ├── function_inside_branch_modify_state_var_3.sol │ │ │ ├── functions_bound_1.sol │ │ │ ├── functions_bound_1_fail.sol │ │ │ ├── functions_external_1.sol │ │ │ ├── functions_external_2.sol │ │ │ ├── functions_external_3.sol │ │ │ ├── functions_external_4.sol │ │ │ ├── functions_identity_1.sol │ │ │ ├── functions_identity_1_fail.sol │ │ │ ├── functions_identity_2.sol │ │ │ ├── functions_identity_2_fail.sol │ │ │ ├── functions_identity_as_tuple.sol │ │ │ ├── functions_identity_as_tuple_fail.sol │ │ │ ├── functions_library_1.sol │ │ │ ├── functions_library_1_fail.sol │ │ │ ├── functions_recursive.sol │ │ │ ├── functions_recursive_indirect.sol │ │ │ ├── functions_storage_var_1.sol │ │ │ ├── functions_storage_var_1_fail.sol │ │ │ ├── functions_storage_var_2.sol │ │ │ ├── functions_storage_var_2_fail.sol │ │ │ ├── functions_trivial_condition_for.sol │ │ │ ├── functions_trivial_condition_for_only_call.sol │ │ │ ├── functions_trivial_condition_if.sol │ │ │ ├── functions_trivial_condition_require.sol │ │ │ ├── functions_trivial_condition_require_only_call.sol │ │ │ ├── functions_trivial_condition_while.sol │ │ │ ├── functions_trivial_condition_while_only_call.sol │ │ │ ├── this_external_call.sol │ │ │ ├── this_external_call_return.sol │ │ │ ├── this_fake.sol │ │ │ └── this_state.sol │ │ ├── inheritance │ │ │ ├── state_variables.sol │ │ │ ├── state_variables_2.sol │ │ │ └── state_variables_3.sol │ │ ├── inline_assembly │ │ │ ├── empty.sol │ │ │ └── local_var.sol │ │ ├── loops │ │ │ ├── do_while_1_fail.sol │ │ │ ├── do_while_1_false_positives.sol │ │ │ ├── for_1_fail.sol │ │ │ ├── for_1_false_positive.sol │ │ │ ├── for_loop_1.sol │ │ │ ├── for_loop_2.sol │ │ │ ├── for_loop_3.sol │ │ │ ├── for_loop_4.sol │ │ │ ├── for_loop_5.sol │ │ │ ├── for_loop_6.sol │ │ │ ├── for_loop_trivial_condition_1.sol │ │ │ ├── for_loop_trivial_condition_2.sol │ │ │ ├── for_loop_trivial_condition_3.sol │ │ │ ├── for_loop_unreachable_1.sol │ │ │ ├── while_1.sol │ │ │ ├── while_1_fail.sol │ │ │ ├── while_2_fail.sol │ │ │ ├── while_loop_simple_1.sol │ │ │ ├── while_loop_simple_2.sol │ │ │ ├── while_loop_simple_3.sol │ │ │ ├── while_loop_simple_4.sol │ │ │ └── while_loop_simple_5.sol │ │ ├── modifiers │ │ │ ├── modifier_assignment_outside_branch.sol │ │ │ ├── modifier_code_after_placeholder.sol │ │ │ ├── modifier_control_flow.sol │ │ │ ├── modifier_inline_function_inside_branch.sol │ │ │ ├── modifier_inside_branch.sol │ │ │ ├── modifier_inside_branch_assignment.sol │ │ │ ├── modifier_inside_branch_assignment_branch.sol │ │ │ ├── modifier_inside_branch_assignment_multi_branches.sol │ │ │ ├── modifier_multi.sol │ │ │ ├── modifier_multi_functions.sol │ │ │ ├── modifier_multi_functions_recursive.sol │ │ │ ├── modifier_multi_parameters.sol │ │ │ ├── modifier_overflow.sol │ │ │ ├── modifier_parameter_copy.sol │ │ │ ├── modifier_parameters.sol │ │ │ ├── modifier_return.sol │ │ │ ├── modifier_same_local_variables.sol │ │ │ ├── modifier_simple.sol │ │ │ ├── modifier_two_invocations.sol │ │ │ └── modifier_two_placeholders.sol │ │ ├── operators │ │ │ ├── compound_add.sol │ │ │ ├── compound_add_array_index.sol │ │ │ ├── compound_add_chain.sol │ │ │ ├── compound_add_mapping.sol │ │ │ ├── compound_mul.sol │ │ │ ├── compound_mul_array_index.sol │ │ │ ├── compound_mul_mapping.sol │ │ │ ├── compound_sub.sol │ │ │ ├── compound_sub_array_index.sol │ │ │ ├── compound_sub_mapping.sol │ │ │ ├── delete_array.sol │ │ │ ├── delete_array_2d.sol │ │ │ ├── delete_array_index.sol │ │ │ ├── delete_array_index_2d.sol │ │ │ ├── delete_function.sol │ │ │ ├── delete_struct.sol │ │ │ ├── mod_even.sol │ │ │ ├── mod_n.sol │ │ │ ├── mod_n_uint16.sol │ │ │ ├── unary_add.sol │ │ │ ├── unary_add_array.sol │ │ │ ├── unary_add_mapping.sol │ │ │ ├── unary_sub.sol │ │ │ ├── unary_sub_array.sol │ │ │ └── unary_sub_mapping.sol │ │ ├── overflow │ │ │ ├── overflow_mul.sol │ │ │ ├── overflow_mul_signed.sol │ │ │ ├── overflow_sum.sol │ │ │ ├── overflow_sum_signed.sol │ │ │ ├── safe_add_1.sol │ │ │ ├── safe_add_2.sol │ │ │ ├── safe_sub_1.sol │ │ │ ├── simple_overflow.sol │ │ │ ├── underflow_sub.sol │ │ │ └── underflow_sub_signed.sol │ │ ├── simple │ │ │ ├── smoke_test.sol │ │ │ └── static_array.sol │ │ ├── special │ │ │ ├── blockhash.sol │ │ │ ├── difficulty.sol │ │ │ ├── gasleft.sol │ │ │ ├── many.sol │ │ │ ├── msg_data.sol │ │ │ ├── msg_sender_1.sol │ │ │ ├── msg_sender_2.sol │ │ │ ├── msg_sender_fail_1.sol │ │ │ ├── msg_sig.sol │ │ │ ├── this.sol │ │ │ └── this_state.sol │ │ ├── typecast │ │ │ ├── cast_address_1.sol │ │ │ ├── cast_different_size_1.sol │ │ │ ├── cast_larger_1.sol │ │ │ ├── cast_larger_2.sol │ │ │ ├── cast_larger_2_fail.sol │ │ │ ├── cast_larger_3.sol │ │ │ ├── cast_smaller_1.sol │ │ │ ├── cast_smaller_2.sol │ │ │ ├── cast_smaller_3.sol │ │ │ ├── enum_from_uint.sol │ │ │ └── enum_to_uint_max_value.sol │ │ ├── types │ │ │ ├── address_balance.sol │ │ │ ├── address_call.sol │ │ │ ├── address_delegatecall.sol │ │ │ ├── address_staticcall.sol │ │ │ ├── address_transfer.sol │ │ │ ├── address_transfer_2.sol │ │ │ ├── address_transfer_insufficient.sol │ │ │ ├── array_aliasing_memory_1.sol │ │ │ ├── array_aliasing_memory_2.sol │ │ │ ├── array_aliasing_memory_3.sol │ │ │ ├── array_aliasing_storage_1.sol │ │ │ ├── array_aliasing_storage_2.sol │ │ │ ├── array_aliasing_storage_3.sol │ │ │ ├── array_aliasing_storage_4.sol │ │ │ ├── array_branch_1d.sol │ │ │ ├── array_branch_2d.sol │ │ │ ├── array_branch_3d.sol │ │ │ ├── array_branches_1d.sol │ │ │ ├── array_branches_2d.sol │ │ │ ├── array_branches_3d.sol │ │ │ ├── array_dynamic_1.sol │ │ │ ├── array_dynamic_1_fail.sol │ │ │ ├── array_dynamic_2.sol │ │ │ ├── array_dynamic_2_fail.sol │ │ │ ├── array_dynamic_3.sol │ │ │ ├── array_dynamic_3_fail.sol │ │ │ ├── array_dynamic_parameter_1.sol │ │ │ ├── array_dynamic_parameter_1_fail.sol │ │ │ ├── array_literal_1.sol │ │ │ ├── array_mapping_aliasing_1.sol │ │ │ ├── array_static_1.sol │ │ │ ├── array_static_1_fail.sol │ │ │ ├── array_static_2.sol │ │ │ ├── array_static_2_fail.sol │ │ │ ├── array_static_3.sol │ │ │ ├── array_static_3_fail.sol │ │ │ ├── array_struct_array_branches_2d.sol │ │ │ ├── bool_int_mixed_1.sol │ │ │ ├── bool_int_mixed_2.sol │ │ │ ├── bool_int_mixed_3.sol │ │ │ ├── bool_simple_1.sol │ │ │ ├── bool_simple_2.sol │ │ │ ├── bool_simple_3.sol │ │ │ ├── bool_simple_4.sol │ │ │ ├── bool_simple_5.sol │ │ │ ├── bool_simple_6.sol │ │ │ ├── bytes_1.sol │ │ │ ├── bytes_2.sol │ │ │ ├── bytes_2_fail.sol │ │ │ ├── contract.sol │ │ │ ├── contract_2.sol │ │ │ ├── contract_3.sol │ │ │ ├── contract_address_conversion.sol │ │ │ ├── contract_address_conversion_2.sol │ │ │ ├── enum_explicit_values.sol │ │ │ ├── enum_explicit_values_2.sol │ │ │ ├── enum_in_library.sol │ │ │ ├── enum_in_library_2.sol │ │ │ ├── enum_in_struct.sol │ │ │ ├── enum_storage_eq.sol │ │ │ ├── enum_transitivity.sol │ │ │ ├── fixed_bytes_1.sol │ │ │ ├── mapping_1.sol │ │ │ ├── mapping_1_fail.sol │ │ │ ├── mapping_2.sol │ │ │ ├── mapping_2d_1.sol │ │ │ ├── mapping_2d_1_fail.sol │ │ │ ├── mapping_3.sol │ │ │ ├── mapping_3d_1.sol │ │ │ ├── mapping_3d_1_fail.sol │ │ │ ├── mapping_4.sol │ │ │ ├── mapping_5.sol │ │ │ ├── mapping_aliasing_1.sol │ │ │ ├── mapping_aliasing_2.sol │ │ │ ├── mapping_as_local_var_1.sol │ │ │ ├── mapping_as_parameter_1.sol │ │ │ ├── mapping_equal_keys_1.sol │ │ │ ├── mapping_equal_keys_2.sol │ │ │ ├── mapping_unsupported_key_type_1.sol │ │ │ ├── rational_large_1.sol │ │ │ ├── storage_value_vars_1.sol │ │ │ ├── storage_value_vars_2.sol │ │ │ ├── storage_value_vars_3.sol │ │ │ ├── storage_value_vars_4.sol │ │ │ ├── string_1.sol │ │ │ ├── string_2.sol │ │ │ ├── struct_1.sol │ │ │ ├── struct_array_branches_1d.sol │ │ │ ├── struct_array_branches_2d.sol │ │ │ ├── struct_array_branches_3d.sol │ │ │ ├── tuple_assignment.sol │ │ │ ├── tuple_assignment_array.sol │ │ │ ├── tuple_assignment_array_empty.sol │ │ │ ├── tuple_assignment_compound.sol │ │ │ ├── tuple_assignment_empty.sol │ │ │ ├── tuple_declarations.sol │ │ │ ├── tuple_declarations_empty.sol │ │ │ ├── tuple_declarations_function.sol │ │ │ ├── tuple_declarations_function_2.sol │ │ │ ├── tuple_declarations_function_empty.sol │ │ │ ├── tuple_function.sol │ │ │ ├── tuple_function_2.sol │ │ │ └── tuple_function_3.sol │ │ └── verification_target │ │ │ ├── constant_condition_1.sol │ │ │ ├── constant_condition_2.sol │ │ │ ├── constant_condition_3.sol │ │ │ ├── simple_assert.sol │ │ │ └── simple_assert_with_require.sol │ ├── smtCheckerTestsJSON │ │ ├── multi.json │ │ ├── multi.sol │ │ ├── simple.json │ │ └── simple.sol │ ├── syntaxTests │ │ ├── array │ │ │ ├── array_pop.sol │ │ │ ├── array_pop_arg.sol │ │ │ ├── bytes_pop.sol │ │ │ ├── calldata.sol │ │ │ ├── calldata_dynamic.sol │ │ │ ├── calldata_multi.sol │ │ │ ├── calldata_multi_dynamic.sol │ │ │ ├── calldata_multi_dynamic_V1.sol │ │ │ ├── contract_array.sol │ │ │ ├── dynamic_memory_array_pop.sol │ │ │ ├── invalid │ │ │ │ ├── contract_index_access.sol │ │ │ │ └── library_index_access.sol │ │ │ ├── length │ │ │ │ ├── array_length_cannot_be_constant_function_parameter.sol │ │ │ │ ├── bytes32_too_large.sol │ │ │ │ ├── bytes32_too_large_multidim.sol │ │ │ │ ├── can_be_constant_in_function.sol │ │ │ │ ├── can_be_constant_in_struct.sol │ │ │ │ ├── can_be_recursive_constant.sol │ │ │ │ ├── cannot_be_function.sol │ │ │ │ ├── cannot_be_function_call.sol │ │ │ │ ├── complex_cyclic_constant.sol │ │ │ │ ├── const_cannot_be_fractional.sol │ │ │ │ ├── constant_var.sol │ │ │ │ ├── cyclic_constant.sol │ │ │ │ ├── fixed_size_multidim_zero_length.sol │ │ │ │ ├── fixed_size_zero_length.sol │ │ │ │ ├── inline_array.sol │ │ │ │ ├── invalid_expression_1.sol │ │ │ │ ├── invalid_expression_2.sol │ │ │ │ ├── invalid_expression_3.sol │ │ │ │ ├── invalid_expression_4.sol │ │ │ │ ├── invalid_expression_5.sol │ │ │ │ ├── non_integer_constant_var.sol │ │ │ │ ├── not_convertible_to_integer.sol │ │ │ │ ├── parameter_too_large.sol │ │ │ │ ├── parameter_too_large_multidim.sol │ │ │ │ ├── parameter_too_large_multidim_ABIv2.sol │ │ │ │ ├── parentheses.sol │ │ │ │ ├── pure_functions.sol │ │ │ │ ├── too_large.sol │ │ │ │ ├── tuples.sol │ │ │ │ └── uint_too_large_multidim.sol │ │ │ ├── new_no_parentheses.sol │ │ │ ├── no_array_pop.sol │ │ │ ├── static_storage_array_pop.sol │ │ │ ├── string_pop.sol │ │ │ └── uninitialized_storage_var.sol │ │ ├── bound │ │ │ ├── bound_all.sol │ │ │ ├── bound_call.sol │ │ │ └── bound_no_call.sol │ │ ├── constants │ │ │ ├── abi_encoding_constant.sol │ │ │ ├── addmod_mulmod_rational.sol │ │ │ ├── addmod_zero.sol │ │ │ ├── assign_constant_function_value.sol │ │ │ ├── cyclic_dependency_1.sol │ │ │ ├── cyclic_dependency_2.sol │ │ │ ├── cyclic_dependency_3.sol │ │ │ ├── cyclic_dependency_4.sol │ │ │ ├── division_by_zero.sol │ │ │ ├── mod_div_rational.sol │ │ │ ├── mod_zero.sol │ │ │ ├── mulmod_zero.sol │ │ │ └── pure_non_rational.sol │ │ ├── constructor │ │ ├── constructor_this.sol │ │ ├── controlFlow │ │ │ ├── mappingReturn │ │ │ │ ├── named_err.sol │ │ │ │ ├── named_fine.sol │ │ │ │ ├── unnamed_err.sol │ │ │ │ └── unnamed_fine.sol │ │ │ ├── storageReturn │ │ │ │ ├── assembly_err.sol │ │ │ │ ├── default_location.sol │ │ │ │ ├── dowhile_err.sol │ │ │ │ ├── dowhile_fine.sol │ │ │ │ ├── for_err.sol │ │ │ │ ├── for_fine.sol │ │ │ │ ├── if_err.sol │ │ │ │ ├── if_fine.sol │ │ │ │ ├── modifier_err.sol │ │ │ │ ├── modifier_fine.sol │ │ │ │ ├── revert_fine.sol │ │ │ │ ├── short_circuit_err.sol │ │ │ │ ├── short_circuit_fine.sol │ │ │ │ ├── smoke.sol │ │ │ │ ├── ternary_err.sol │ │ │ │ ├── ternary_fine.sol │ │ │ │ ├── tuple_fine.sol │ │ │ │ ├── unimplemented_internal.sol │ │ │ │ ├── unimplemented_library.sol │ │ │ │ ├── while_err.sol │ │ │ │ └── while_fine.sol │ │ │ ├── uninitializedAccess │ │ │ │ ├── always_revert.sol │ │ │ │ ├── assembly.sol │ │ │ │ ├── functionType.sol │ │ │ │ ├── modifier_order_fail.sol │ │ │ │ ├── modifier_order_fine.sol │ │ │ │ ├── modifier_post_access.sol │ │ │ │ ├── modifier_pre_access.sol │ │ │ │ ├── smoke.sol │ │ │ │ ├── struct.sol │ │ │ │ └── unreachable.sol │ │ │ └── unreachableCode │ │ │ │ ├── comment_fine.sol │ │ │ │ ├── constant_condition.sol │ │ │ │ ├── do_while_continue.sol │ │ │ │ ├── double_return.sol │ │ │ │ ├── double_revert.sol │ │ │ │ ├── for_break.sol │ │ │ │ ├── if_both_return.sol │ │ │ │ ├── revert.sol │ │ │ │ ├── revert_empty.sol │ │ │ │ ├── while_break.sol │ │ │ │ └── while_continue.sol │ │ ├── conversion │ │ │ ├── allowed_conversion_to_bytes_array.sol │ │ │ ├── allowed_conversion_to_string.sol │ │ │ ├── conversion_to_bytes.sol │ │ │ ├── explicit_conversion_from_storage_array_ref.sol │ │ │ ├── function_type_nonpayable_payable.sol │ │ │ ├── function_type_nonpayable_pure.sol │ │ │ ├── function_type_nonpayable_view.sol │ │ │ ├── function_type_payable_nonpayable.sol │ │ │ ├── function_type_payable_pure.sol │ │ │ ├── function_type_payable_view.sol │ │ │ ├── function_type_pure_nonpayable.sol │ │ │ ├── function_type_pure_payable.sol │ │ │ ├── function_type_pure_view.sol │ │ │ ├── function_type_same.sol │ │ │ ├── function_type_view_nonpayable.sol │ │ │ ├── function_type_view_payable.sol │ │ │ ├── function_type_view_pure.sol │ │ │ ├── implicit_conversion_from_storage_array_ref.sol │ │ │ ├── not_allowed_conversion_to_int_array_pointer1.sol │ │ │ └── not_allowed_conversion_to_int_array_pointer2.sol │ │ ├── dataLocations │ │ │ ├── data_location_in_function_type.sol │ │ │ ├── data_location_in_function_type_fail.sol │ │ │ ├── externalFunction │ │ │ │ ├── external_function_return_parameters_no_data_location.sol │ │ │ │ ├── function_argument_location_specifier_test_external_calldata.sol │ │ │ │ ├── function_argument_location_specifier_test_external_memory.sol │ │ │ │ └── function_argument_location_specifier_test_external_storage.sol │ │ │ ├── function_argument_location_specifier_test_non_reference_type.sol │ │ │ ├── function_parameters_with_data_location_fine.sol │ │ │ ├── function_return_parameters_with_data_location_fine.sol │ │ │ ├── function_type_array_as_reference_type.sol │ │ │ ├── internalFunction │ │ │ │ ├── function_argument_location_specifier_test_internal_calldata.sol │ │ │ │ ├── function_argument_location_specifier_test_internal_memory.sol │ │ │ │ ├── function_argument_location_specifier_test_internal_storage.sol │ │ │ │ ├── internal_function_parameters_no_data_location.sol │ │ │ │ └── internal_function_return_parameters_no_data_location.sol │ │ │ ├── libraries │ │ │ │ ├── library_external_function_params_no_data_location.sol │ │ │ │ ├── library_external_function_return_no_data_location.sol │ │ │ │ ├── library_function_with_data_location_fine.sol │ │ │ │ ├── library_internal_function_no_data_location.sol │ │ │ │ ├── library_private_function_no_data_location.sol │ │ │ │ └── library_public_function_no_data_location.sol │ │ │ ├── libraryExternalFunction │ │ │ │ ├── function_argument_location_specifier_test_external_calldata.sol │ │ │ │ ├── function_argument_location_specifier_test_external_memory.sol │ │ │ │ └── function_argument_location_specifier_test_external_storage.sol │ │ │ ├── libraryInternalFunction │ │ │ │ ├── function_argument_location_specifier_test_internal_calldata.sol │ │ │ │ ├── function_argument_location_specifier_test_internal_memory.sol │ │ │ │ └── function_argument_location_specifier_test_internal_storage.sol │ │ │ ├── memory_storage_data_location.sol │ │ │ ├── privateFunction │ │ │ │ ├── private_function_parameters_no_data_location.sol │ │ │ │ └── private_function_return_parameters_no_data_location.sol │ │ │ ├── publicFunction │ │ │ │ ├── function_argument_location_specifier_test_public_calldata.sol │ │ │ │ ├── function_argument_location_specifier_test_public_memory.sol │ │ │ │ ├── function_argument_location_specifier_test_public_storage.sol │ │ │ │ ├── public_function_parameters_no_data_location.sol │ │ │ │ └── public_function_return_parameters_no_data_location.sol │ │ │ ├── variable_declaration_location_specifier_test_non_reference_type.sol │ │ │ └── variable_declaration_location_specifier_test_reference_type.sol │ │ ├── denominations │ │ │ ├── combining_hex_and_denomination.sol │ │ │ ├── denominations.sol │ │ │ ├── deprecated_year.sol │ │ │ └── fixed_point_division.sol │ │ ├── deprecated_functions.sol │ │ ├── double_stateVariable_declaration.sol │ │ ├── double_variable_declaration.sol │ │ ├── emit │ │ │ ├── emit_empty.sol │ │ │ └── emit_non_event.sol │ │ ├── empty_struct.sol │ │ ├── events │ │ │ ├── event_array_indexed_v2.sol │ │ │ ├── event_array_v2.sol │ │ │ ├── event_nested_array.sol │ │ │ ├── event_nested_array_2.sol │ │ │ ├── event_nested_array_in_struct.sol │ │ │ ├── event_nested_array_indexed_v2.sol │ │ │ ├── event_nested_array_v2.sol │ │ │ ├── event_struct.sol │ │ │ ├── event_struct_indexed.sol │ │ │ ├── event_struct_indexed_v2.sol │ │ │ └── event_struct_v2.sol │ │ ├── fallback │ │ │ ├── default_visibility.sol │ │ │ ├── pure_modifier.sol │ │ │ └── view_modifier.sol │ │ ├── functionCalls │ │ │ ├── arbitrary_parameters_but_restricted_first_type.sol │ │ │ ├── named_arguments_for_functions_that_take_arbitrary_parameters.sol │ │ │ ├── named_arguments_overload.sol │ │ │ ├── named_arguments_overload_failing1.sol │ │ │ ├── named_arguments_overload_failing2.sol │ │ │ └── named_arguments_overload_failing3.sol │ │ ├── functionTypes │ │ │ ├── call_value_on_non_constructor.sol │ │ │ ├── call_value_on_non_payable_function_type.sol │ │ │ ├── call_value_on_payable_function_type.sol │ │ │ ├── delete_external_function_type_invalid.sol │ │ │ ├── delete_function_type.sol │ │ │ ├── delete_function_type_invalid.sol │ │ │ ├── external_function_to_function_type_calldata_parameter.sol │ │ │ ├── external_function_type_public_variable.sol │ │ │ ├── external_function_type_returning_internal.sol │ │ │ ├── external_function_type_taking_internal.sol │ │ │ ├── external_function_type_to_address.sol │ │ │ ├── external_function_type_to_address_payable.sol │ │ │ ├── external_function_type_to_uint.sol │ │ │ ├── function_type.sol │ │ │ ├── function_type_arrays.sol │ │ │ ├── function_type_constructor.sol │ │ │ ├── function_type_constructor_local.sol │ │ │ ├── function_type_internal_public_variable.sol │ │ │ ├── function_type_parameter.sol │ │ │ ├── function_type_return_parameters_with_names.sol │ │ │ ├── function_type_returned.sol │ │ │ ├── function_type_struct.sol │ │ │ ├── function_type_struct_undefined_member.sol │ │ │ ├── function_type_variable_external_internal.sol │ │ │ ├── function_types_internal_visibility_error.sol │ │ │ ├── function_types_variable_visibility.sol │ │ │ ├── internal_function_array_memory_as_external_parameter_in_library_external.sol │ │ │ ├── internal_function_array_storage_as_external_parameter_in_library_external.sol │ │ │ ├── internal_function_as_external_parameter.sol │ │ │ ├── internal_function_as_external_parameter_in_library_external.sol │ │ │ ├── internal_function_as_external_parameter_in_library_internal.sol │ │ │ ├── internal_function_returned_from_public_function.sol │ │ │ ├── internal_function_struct_as_external_parameter_in_library_external.sol │ │ │ ├── internal_function_type_to_address.sol │ │ │ ├── payable_internal_function_type.sol │ │ │ ├── payable_internal_function_type_is_not_fatal.sol │ │ │ ├── private_function_type.sol │ │ │ ├── public_function_type.sol │ │ │ ├── valid_function_type_variables.sol │ │ │ └── warn_function_type_parameters_with_names.sol │ │ ├── getter │ │ │ ├── complex_struct.sol │ │ │ ├── nested_structs.sol │ │ │ ├── recursive_struct.sol │ │ │ └── simple_struct.sol │ │ ├── globalFunctions │ │ │ ├── call_with_wrong_arg_count.sol │ │ │ ├── callcode_with_wrong_arg_count.sol │ │ │ ├── delegatecall_with_wrong_arg_count.sol │ │ │ ├── keccak256_with_wrong_arg_count.sol │ │ │ ├── ripemd160_with_wrong_arg_count.sol │ │ │ ├── sha256_with_wrong_arg_count.sol │ │ │ ├── sha3_no_call.sol │ │ │ ├── sha3_override.sol │ │ │ ├── sha3_var.sol │ │ │ ├── suicide_no_call.sol │ │ │ ├── suicide_override.sol │ │ │ └── suicide_var.sol │ │ ├── indexing │ │ │ ├── array_multidim_rational.sol │ │ │ ├── array_multim_overflow_index.sol │ │ │ ├── array_negative_index.sol │ │ │ ├── array_noninteger_index.sol │ │ │ ├── array_out_of_bounds_index.sol │ │ │ ├── array_without_index.sol │ │ │ ├── fixedbytes_negative_index.sol │ │ │ ├── fixedbytes_noninteger_index.sol │ │ │ ├── fixedbytes_out_of_bounds_index.sol │ │ │ ├── fixedbytes_without_index.sol │ │ │ ├── function_type.sol │ │ │ ├── function_type_without_index.sol │ │ │ └── struct_array_noninteger_index.sol │ │ ├── inheritance │ │ │ ├── allow_empty_duplicated_super_constructor_call.sol │ │ │ ├── base_arguments_empty_parentheses.sol │ │ │ ├── base_arguments_multiple_inheritance.sol │ │ │ ├── base_arguments_no_parentheses.sol │ │ │ ├── disallow_modifier_style_without_parentheses.sol │ │ │ ├── duplicated_constructor_call │ │ │ │ ├── ancestor.sol │ │ │ │ ├── base.sol │ │ │ │ ├── base_multi.sol │ │ │ │ ├── base_multi_no_constructor.sol │ │ │ │ └── base_multi_no_constructor_modifier_style.sol │ │ │ ├── modifiers_in_constructor_context.sol │ │ │ ├── override │ │ │ │ ├── add_view.sol │ │ │ │ ├── calldata_memory.sol │ │ │ │ ├── calldata_memory_conflict.sol │ │ │ │ ├── calldata_memory_interface.sol │ │ │ │ ├── calldata_memory_interface_instantiate.sol │ │ │ │ ├── calldata_memory_interface_struct.sol │ │ │ │ ├── calldata_memory_struct.sol │ │ │ │ ├── change_return_types_in_interface.sol │ │ │ │ ├── external_turns_public_no_params.sol │ │ │ │ ├── function_state_variable.sol │ │ │ │ ├── implement_interface_by_public_variable.sol │ │ │ │ ├── implement_internal_function_by_public_variable.sol │ │ │ │ ├── implement_private_function_by_public_variable.sol │ │ │ │ ├── implement_public_function_by_public_variable.sol │ │ │ │ ├── internal_external.sol │ │ │ │ ├── internal_external_inheritance.sol │ │ │ │ ├── remove_view.sol │ │ │ │ └── state_variable_function.sol │ │ │ ├── reference_non_base_ctor.sol │ │ │ ├── super_on_external.sol │ │ │ ├── too_few_base_arguments.sol │ │ │ └── wrong_type_base_arguments.sol │ │ ├── inlineAssembly │ │ │ ├── assignment_from_contract.sol │ │ │ ├── assignment_from_functiontype.sol │ │ │ ├── assignment_from_library.sol │ │ │ ├── assignment_from_super.sol │ │ │ ├── assignment_to_special.sol │ │ │ ├── function_call_invalid_argument_count.sol │ │ │ ├── function_call_not_found.sol │ │ │ ├── function_call_to_label.sol │ │ │ ├── function_call_to_variable.sol │ │ │ ├── function_without_call.sol │ │ │ ├── in_modifier.sol │ │ │ ├── invalid │ │ │ │ ├── assign_to_instruction.sol │ │ │ │ ├── bare_instructions_disallowed.sol │ │ │ │ ├── calldata_variables.sol │ │ │ │ ├── constant_access.sol │ │ │ │ ├── constant_assignment.sol │ │ │ │ ├── constant_variable_via_offset.sol │ │ │ │ ├── empty_fun_arg.sol │ │ │ │ ├── empty_function_name.sol │ │ │ │ ├── invalid_number.sol │ │ │ │ ├── jump_disallowed.sol │ │ │ │ ├── jump_invalid_label.sol │ │ │ │ ├── label_disallowed.sol │ │ │ │ ├── leave_items_on_tack.sol │ │ │ │ ├── literals_on_stack_disallowed.sol │ │ │ │ ├── local_variable_access_out_of_functions.sol │ │ │ │ ├── local_variable_access_out_of_functions_storage_ptr.sol │ │ │ │ ├── missing_variable.sol │ │ │ │ ├── missing_variable_in_assign.sol │ │ │ │ ├── multiple_assign_to_instruction.sol │ │ │ │ ├── no_identifier_assignment.sol │ │ │ │ ├── no_identifier_label.sol │ │ │ │ ├── storage_assignment.sol │ │ │ │ ├── storage_assignment_in_modifier.sol │ │ │ │ ├── storage_variable_access_out_of_functions.sol │ │ │ │ ├── unbalanced_negative_stack.sol │ │ │ │ ├── unbalanced_positive_stack.sol │ │ │ │ ├── unbalanced_two_stack_load.sol │ │ │ │ ├── whitespace_in_assignment.sol │ │ │ │ └── whitespace_in_multiple_assignment.sol │ │ │ ├── no_unused_variable_warning.sol │ │ │ ├── overloaded_reference.sol │ │ │ ├── period_in_identifer.sol │ │ │ ├── storage_reference.sol │ │ │ ├── storage_reference_assignment.sol │ │ │ ├── storage_reference_empty_offset.sol │ │ │ ├── storage_reference_empty_slot.sol │ │ │ ├── storage_reference_fine.sol │ │ │ ├── storage_reference_on_function.sol │ │ │ ├── storage_reference_on_memory.sol │ │ │ └── two_stack_slots.sol │ │ ├── inline_arrays │ │ │ ├── dynamic_inline_array.sol │ │ │ ├── inline_array_declaration_and_passing_implicit_conversion.sol │ │ │ ├── inline_array_declaration_and_passing_implicit_conversion_strings.sol │ │ │ ├── inline_array_declaration_const_int_conversion.sol │ │ │ ├── inline_array_declaration_const_string_conversion.sol │ │ │ ├── inline_array_declaration_no_type.sol │ │ │ ├── inline_array_declaration_no_type_strings.sol │ │ │ ├── inline_array_fixed_types.sol │ │ │ ├── inline_array_of_mapping_type.sol │ │ │ ├── inline_array_rationals.sol │ │ │ ├── invalid_types_in_inline_array.sol │ │ │ └── lvalues_as_inline_array.sol │ │ ├── literalOperations │ │ │ ├── division_by_zero.sol │ │ │ ├── division_by_zero_complex.sol │ │ │ ├── mod_zero.sol │ │ │ └── mod_zero_complex.sol │ │ ├── literal_comparisons.sol │ │ ├── memberLookup │ │ │ ├── contract_not_payable_send.sol │ │ │ ├── contract_not_payable_transfer.sol │ │ │ ├── failed_function_lookup.sol │ │ │ ├── failed_function_lookup_in_library.sol │ │ │ ├── internal_function_type.sol │ │ │ ├── member_not_unique.sol │ │ │ ├── member_value_not_unique.sol │ │ │ ├── memory_structs_with_mappings.sol │ │ │ ├── msg_value_modifier_payable.sol │ │ │ ├── msg_value_modifier_pure.sol │ │ │ ├── msg_value_modifier_view.sol │ │ │ └── push_on_memory_types.sol │ │ ├── metaTypes │ │ │ ├── codeAccess.sol │ │ │ ├── codeAccessAbstractCreation.sol │ │ │ ├── codeAccessAbstractRuntime.sol │ │ │ ├── codeAccessBase.sol │ │ │ ├── codeAccessCyclic.sol │ │ │ ├── codeAccessIsConstant.sol │ │ │ ├── codeAccessLibrary.sol │ │ │ ├── codeIsNoLValue.sol │ │ │ ├── name.sol │ │ │ ├── name_constant.sol │ │ │ ├── name_other_contract.sol │ │ │ ├── noArgForType.sol │ │ │ ├── runtimeCodeWarningAssembly.sol │ │ │ ├── tooManyArgsForType.sol │ │ │ ├── typeNotRegularIdentifierContractName.sol │ │ │ ├── typeNotRegularIdentifierFunction.sol │ │ │ ├── typeNotRegularIdentifierParameter.sol │ │ │ ├── typeNotRegularIdentifierStateVariable.sol │ │ │ ├── typeNotRegularIdentifierVariable.sol │ │ │ ├── typeOfContract.sol │ │ │ ├── typeRecursive.sol │ │ │ └── unsupportedArgForType.sol │ │ ├── missing_state_variable.sol │ │ ├── modifiers │ │ │ ├── base_constructor_double_invocation.sol │ │ │ ├── constructor_call_invalid_arg_count.sol │ │ │ ├── function_modifier_double_invocation.sol │ │ │ ├── function_modifier_invocation.sol │ │ │ ├── function_modifier_invocation_local_variables.sol │ │ │ ├── function_modifier_invocation_parameters.sol │ │ │ ├── function_overrides_modifier.sol │ │ │ ├── illegal_modifier_override.sol │ │ │ ├── invalid_function_modifier_type.sol │ │ │ ├── legal_modifier_override.sol │ │ │ ├── modifier_overrides_function.sol │ │ │ ├── modifier_returns_value.sol │ │ │ ├── modifier_without_underscore.sol │ │ │ └── modifiers_on_abstract_functions_no_parser_error.sol │ │ ├── more_than_256_declarationerrors.sol │ │ ├── more_than_256_syntaxerrors.sol │ │ ├── multiVariableDeclaration │ │ │ ├── differentNumberOfComponents.sol │ │ │ ├── differentNumberOfComponentsFromReturn.sol │ │ │ ├── disallowWildcards.sol │ │ │ ├── disallowWildcardsFromReturn.sol │ │ │ ├── multiSingleVariableDeclaration.sol │ │ │ ├── multiVariableDeclarationComplex.sol │ │ │ ├── multiVariableDeclarationEmpty.sol │ │ │ ├── multiVariableDeclarationInvalidType.sol │ │ │ ├── multiVariableDeclarationScoping.sol │ │ │ ├── multiVariableDeclarationScoping2.sol │ │ │ ├── multiVariableDeclarationSimple.sol │ │ │ ├── multiVariableDeclarationThatIsExpression.sol │ │ │ ├── oneElementTuple.sol │ │ │ └── sameNumberOfComponents.sol │ │ ├── multiline_comments.sol │ │ ├── nameAndTypeResolution │ │ │ ├── 001_name_references.sol │ │ │ ├── 002_undeclared_name.sol │ │ │ ├── 003_undeclared_name_is_not_fatal.sol │ │ │ ├── 004_reference_to_later_declaration.sol │ │ │ ├── 010_type_conversion_for_comparison.sol │ │ │ ├── 011_type_conversion_for_comparison_invalid.sol │ │ │ ├── 013_large_string_literal.sol │ │ │ ├── 014_balance.sol │ │ │ ├── 015_balance_invalid.sol │ │ │ ├── 017_assignment_to_struct.sol │ │ │ ├── 018_forward_function_reference.sol │ │ │ ├── 019_comparison_bitop_precedence.sol │ │ │ ├── 020_comparison_of_function_types_lt_1.sol │ │ │ ├── 021_comparison_of_function_types_lt_2.sol │ │ │ ├── 022_comparison_of_function_types_gt_1.sol │ │ │ ├── 023_comparison_of_function_types_gt_2.sol │ │ │ ├── 024_comparison_of_function_types_eq.sol │ │ │ ├── 025_comparison_of_mapping_types.sol │ │ │ ├── 029_create_abstract_contract.sol │ │ │ ├── 030_redeclare_implemented_abstract_function_as_abstract.sol │ │ │ ├── 039_functions_with_identical_structs_in_interface.sol │ │ │ ├── 040_functions_with_different_structs_in_interface.sol │ │ │ ├── 041_functions_with_stucts_of_non_external_types_in_interface.sol │ │ │ ├── 042_functions_with_stucts_of_non_external_types_in_interface_2.sol │ │ │ ├── 043_functions_with_stucts_of_non_external_types_in_interface_nested.sol │ │ │ ├── 044_returning_multi_dimensional_arrays_new_abi.sol │ │ │ ├── 045_returning_multi_dimensional_arrays.sol │ │ │ ├── 046_returning_multi_dimensional_static_arrays.sol │ │ │ ├── 047_returning_arrays_in_structs_new_abi.sol │ │ │ ├── 048_returning_arrays_in_structs_arrays.sol │ │ │ ├── 049_function_external_call_allowed_conversion.sol │ │ │ ├── 050_function_external_call_not_allowed_conversion.sol │ │ │ ├── 051_function_internal_allowed_conversion.sol │ │ │ ├── 052_function_internal_not_allowed_conversion.sol │ │ │ ├── 053_hash_collision_in_interface.sol │ │ │ ├── 054_inheritance_basic.sol │ │ │ ├── 055_inheritance_diamond_basic.sol │ │ │ ├── 056_cyclic_inheritance.sol │ │ │ ├── 057_legal_override_direct.sol │ │ │ ├── 058_legal_override_indirect.sol │ │ │ ├── 059_illegal_override_visibility.sol │ │ │ ├── 060_complex_inheritance.sol │ │ │ ├── 061_missing_base_constructor_arguments.sol │ │ │ ├── 062_base_constructor_arguments_override.sol │ │ │ ├── 063_implicit_derived_to_base_conversion.sol │ │ │ ├── 064_implicit_base_to_derived_conversion.sol │ │ │ ├── 065_super_excludes_current_contract.sol │ │ │ ├── 067_function_clash_with_state_variable_accessor.sol │ │ │ ├── 069_base_class_state_variable_accessor.sol │ │ │ ├── 070_struct_accessor_one_array_only.sol │ │ │ ├── 071_base_class_state_variable_internal_member.sol │ │ │ ├── 072_state_variable_member_of_wrong_class1.sol │ │ │ ├── 073_state_variable_member_of_wrong_class2.sol │ │ │ ├── 074_fallback_function.sol │ │ │ ├── 075_fallback_function_with_arguments.sol │ │ │ ├── 076_fallback_function_in_library.sol │ │ │ ├── 077_fallback_function_with_return_parameters.sol │ │ │ ├── 078_fallback_function_twice.sol │ │ │ ├── 079_fallback_function_inheritance.sol │ │ │ ├── 080_event.sol │ │ │ ├── 081_event_too_many_indexed.sol │ │ │ ├── 082_anonymous_event_four_indexed.sol │ │ │ ├── 083_anonymous_event_too_many_indexed.sol │ │ │ ├── 084_events_with_same_name.sol │ │ │ ├── 085_events_with_same_name_unnamed_arguments.sol │ │ │ ├── 086_events_with_same_name_different_types.sol │ │ │ ├── 087_double_event_declaration.sol │ │ │ ├── 088_double_event_declaration_ignores_anonymous.sol │ │ │ ├── 089_double_event_declaration_ignores_indexed.sol │ │ │ ├── 090_event_call.sol │ │ │ ├── 091_event_function_inheritance_clash.sol │ │ │ ├── 092_function_event_inheritance_clash.sol │ │ │ ├── 093_function_event_in_contract_clash.sol │ │ │ ├── 094_event_inheritance.sol │ │ │ ├── 095_multiple_events_argument_clash.sol │ │ │ ├── 096_access_to_default_function_visibility.sol │ │ │ ├── 097_access_to_internal_function.sol │ │ │ ├── 098_access_to_default_state_variable_visibility.sol │ │ │ ├── 099_access_to_internal_state_variable.sol │ │ │ ├── 100_error_count_in_named_args.sol │ │ │ ├── 101_empty_in_named_args.sol │ │ │ ├── 102_duplicate_parameter_names_in_named_args.sol │ │ │ ├── 103_invalid_parameter_names_in_named_args.sol │ │ │ ├── 104_empty_name_input_parameter.sol │ │ │ ├── 105_constant_input_parameter.sol │ │ │ ├── 106_empty_name_return_parameter.sol │ │ │ ├── 107_empty_name_input_parameter_with_named_one.sol │ │ │ ├── 108_empty_name_return_parameter_with_named_one.sol │ │ │ ├── 110_no_overflow_with_large_literal.sol │ │ │ ├── 111_overflow_caused_by_ether_units.sol │ │ │ ├── 112_exp_operator_exponent_too_big.sol │ │ │ ├── 113_exp_warn_literal_base_1.sol │ │ │ ├── 114_exp_warn_literal_base_2.sol │ │ │ ├── 115_exp_warn_literal_base_3.sol │ │ │ ├── 116_shift_warn_literal_base_1.sol │ │ │ ├── 117_shift_warn_literal_base_2.sol │ │ │ ├── 118_shift_warn_literal_base_3.sol │ │ │ ├── 119_shift_warn_literal_base_4.sol │ │ │ ├── 124_enum_member_access.sol │ │ │ ├── 125_enum_member_access_accross_contracts.sol │ │ │ ├── 126_enum_invalid_member_access.sol │ │ │ ├── 127_enum_invalid_direct_member_access.sol │ │ │ ├── 128_enum_explicit_conversion_is_okay.sol │ │ │ ├── 129_int_to_enum_explicit_conversion_is_okay.sol │ │ │ ├── 130_enum_implicit_conversion_is_not_okay_256.sol │ │ │ ├── 131_enum_implicit_conversion_is_not_okay_64.sol │ │ │ ├── 132_enum_to_enum_conversion_is_not_okay.sol │ │ │ ├── 133_enum_duplicate_values.sol │ │ │ ├── 134_enum_name_resolution_under_current_contract_name.sol │ │ │ ├── 135_private_visibility.sol │ │ │ ├── 136_private_visibility_via_explicit_base_access.sol │ │ │ ├── 137_external_visibility.sol │ │ │ ├── 138_similar_name_suggestions_expected.sol │ │ │ ├── 139_no_name_suggestion.sol │ │ │ ├── 140_multiple_similar_suggestions.sol │ │ │ ├── 141_multiple_scopes_suggestions.sol │ │ │ ├── 142_inheritence_suggestions.sol │ │ │ ├── 143_no_spurious_identifier_suggestions_with_submatch.sol │ │ │ ├── 144_no_spurious_identifier_suggestions.sol │ │ │ ├── 145_external_base_visibility.sol │ │ │ ├── 146_external_argument_assign.sol │ │ │ ├── 147_external_argument_increment.sol │ │ │ ├── 148_external_argument_delete.sol │ │ │ ├── 149_test_for_bug_override_function_with_bytearray_type.sol │ │ │ ├── 150_array_with_nonconstant_length.sol │ │ │ ├── 151_array_with_negative_length.sol │ │ │ ├── 152_array_copy_with_different_types1.sol │ │ │ ├── 153_array_copy_with_different_types2.sol │ │ │ ├── 154_array_copy_with_different_types_conversion_possible.sol │ │ │ ├── 155_array_copy_with_different_types_static_dynamic.sol │ │ │ ├── 156_array_copy_with_different_types_dynamic_static.sol │ │ │ ├── 157_array_of_undeclared_type.sol │ │ │ ├── 158_storage_variable_initialization_with_incorrect_type_int.sol │ │ │ ├── 159_storage_variable_initialization_with_incorrect_type_string.sol │ │ │ ├── 160_test_byte_is_alias_of_byte1.sol │ │ │ ├── 164_assigning_value_to_const_variable.sol │ │ │ ├── 165_assigning_state_to_const_variable.sol │ │ │ ├── 167_constant_string_literal_disallows_assignment.sol │ │ │ ├── 168_assignment_to_const_var_involving_conversion.sol │ │ │ ├── 169_assignment_to_const_var_involving_expression.sol │ │ │ ├── 170_assignment_to_const_var_involving_keccak.sol │ │ │ ├── 171_assignment_to_const_array_vars.sol │ │ │ ├── 172_assignment_to_const_string_bytes.sol │ │ │ ├── 173_constant_struct.sol │ │ │ ├── 174_address_is_constant.sol │ │ │ ├── 175_uninitialized_const_variable.sol │ │ │ ├── 176_overloaded_function_cannot_resolve.sol │ │ │ ├── 177_ambiguous_overloaded_function.sol │ │ │ ├── 178_assignment_of_nonoverloaded_function.sol │ │ │ ├── 179_assignment_of_overloaded_function.sol │ │ │ ├── 180_external_types_clash.sol │ │ │ ├── 181_override_changes_return_types.sol │ │ │ ├── 182_equal_overload.sol │ │ │ ├── 185_invalid_utf8_implicit.sol │ │ │ ├── 186_invalid_utf8_explicit.sol │ │ │ ├── 187_large_utf8_codepoint.sol │ │ │ ├── 188_string_index.sol │ │ │ ├── 189_string_length.sol │ │ │ ├── 190_negative_integers_to_signed_out_of_bound.sol │ │ │ ├── 191_negative_integers_to_signed_min.sol │ │ │ ├── 192_positive_integers_to_signed_out_of_bound.sol │ │ │ ├── 193_positive_integers_to_signed_out_of_bound_max.sol │ │ │ ├── 194_negative_integers_to_unsigned.sol │ │ │ ├── 195_positive_integers_to_unsigned_out_of_bound.sol │ │ │ ├── 196_integer_boolean_or.sol │ │ │ ├── 197_integer_boolean_and.sol │ │ │ ├── 198_integer_boolean_not.sol │ │ │ ├── 199_integer_unsigned_exp_signed.sol │ │ │ ├── 200_integer_signed_exp_unsigned.sol │ │ │ ├── 201_integer_signed_exp_signed.sol │ │ │ ├── 202_bytes_reference_compare_operators.sol │ │ │ ├── 203_struct_reference_compare_operators.sol │ │ │ ├── 204_overwrite_memory_location_external.sol │ │ │ ├── 205_overwrite_storage_location_external.sol │ │ │ ├── 206_storage_location_local_variables.sol │ │ │ ├── 207_no_mappings_in_memory_array.sol │ │ │ ├── 208_assignment_mem_to_local_storage_variable.sol │ │ │ ├── 209_storage_assign_to_different_local_variable.sol │ │ │ ├── 210_uninitialized_mapping_variable.sol │ │ │ ├── 211_uninitialized_mapping_array_variable.sol │ │ │ ├── 213_no_delete_on_storage_pointers.sol │ │ │ ├── 214_assignment_mem_storage_variable_directly.sol │ │ │ ├── 215_function_argument_mem_to_storage.sol │ │ │ ├── 216_function_argument_storage_to_mem.sol │ │ │ ├── 217_mem_array_assignment_changes_base_type.sol │ │ │ ├── 219_memory_arrays_not_resizeable.sol │ │ │ ├── 220_struct_constructor.sol │ │ │ ├── 221_struct_constructor_nested.sol │ │ │ ├── 222_struct_named_constructor.sol │ │ │ ├── 223_literal_strings.sol │ │ │ ├── 224_string_bytes_conversion.sol │ │ │ ├── 225_inheriting_from_library.sol │ │ │ ├── 226_inheriting_library.sol │ │ │ ├── 227_library_having_variables.sol │ │ │ ├── 228_valid_library.sol │ │ │ ├── 229_call_to_library_function.sol │ │ │ ├── 230_creating_contract_within_the_contract.sol │ │ │ ├── 231_array_out_of_bound_access.sol │ │ │ ├── 232_literal_string_to_storage_pointer.sol │ │ │ ├── 233_non_initialized_references.sol │ │ │ ├── 235_abi_encode_with_large_integer_constant.sol │ │ │ ├── 236_cyclic_binary_dependency.sol │ │ │ ├── 237_cyclic_binary_dependency_via_inheritance.sol │ │ │ ├── 244_tuples.sol │ │ │ ├── 245_tuples_empty_components.sol │ │ │ ├── 250_member_access_parser_ambiguity.sol │ │ │ ├── 251_using_for_library.sol │ │ │ ├── 252_using_for_not_library.sol │ │ │ ├── 253_using_for_function_exists.sol │ │ │ ├── 254_using_for_function_on_int.sol │ │ │ ├── 255_using_for_function_on_struct.sol │ │ │ ├── 256_using_for_overload.sol │ │ │ ├── 257_using_for_by_name.sol │ │ │ ├── 258_using_for_mismatch.sol │ │ │ ├── 259_using_for_not_used.sol │ │ │ ├── 260_library_memory_struct.sol │ │ │ ├── 261_using_for_arbitrary_mismatch.sol │ │ │ ├── 262_bound_function_in_var.sol │ │ │ ├── 263_create_memory_arrays.sol │ │ │ ├── 264_mapping_in_memory_array.sol │ │ │ ├── 265_new_for_non_array.sol │ │ │ ├── 268_function_overload_array_type.sol │ │ │ ├── 275_inline_struct_declaration_arrays.sol │ │ │ ├── 279_break_not_in_loop.sol │ │ │ ├── 280_continue_not_in_loop.sol │ │ │ ├── 281_continue_not_in_loop_2.sol │ │ │ ├── 282_invalid_different_types_for_conditional_expression.sol │ │ │ ├── 283_left_value_in_conditional_expression_not_supported_yet.sol │ │ │ ├── 284_conditional_expression_with_different_struct.sol │ │ │ ├── 285_conditional_expression_with_different_function_type.sol │ │ │ ├── 286_conditional_expression_with_different_enum.sol │ │ │ ├── 287_conditional_expression_with_different_mapping.sol │ │ │ ├── 288_conditional_with_all_types.sol │ │ │ ├── 289_uint7_and_uintM_as_identifier.sol │ │ │ ├── 290_varM_disqualified_as_keyword_1.sol │ │ │ ├── 290_varM_disqualified_as_keyword_2.sol │ │ │ ├── 290_varM_disqualified_as_keyword_3.sol │ │ │ ├── 291_modifier_is_not_a_valid_typename.sol │ │ │ ├── 292_modifier_is_not_a_valid_typename_is_not_fatal.sol │ │ │ ├── 293_function_is_not_a_valid_typename.sol │ │ │ ├── 294_long_uint_variable_fails.sol │ │ │ ├── 295_bytes10abc_is_identifier.sol │ │ │ ├── 296_int10abc_is_identifier.sol │ │ │ ├── 297_library_functions_do_not_have_value.sol │ │ │ ├── 298_invalid_fixed_types_0x7_mxn.sol │ │ │ ├── 299_invalid_fixed_types_long_invalid_identifier.sol │ │ │ ├── 300_invalid_fixed_types_7x8_mxn.sol │ │ │ ├── 301_library_instances_cannot_be_used.sol │ │ │ ├── 302_invalid_fixed_type_long.sol │ │ │ ├── 303_fixed_type_int_conversion.sol │ │ │ ├── 304_fixed_type_rational_int_conversion.sol │ │ │ ├── 305_fixed_type_rational_fraction_conversion.sol │ │ │ ├── 306_invalid_int_implicit_conversion_from_fixed.sol │ │ │ ├── 307_rational_unary_minus_operation.sol │ │ │ ├── 308_rational_unary_plus_operation.sol │ │ │ ├── 312_leading_zero_rationals_convert.sol │ │ │ ├── 313_fixed_type_size_capabilities.sol │ │ │ ├── 314_fixed_type_zero_handling.sol │ │ │ ├── 315_fixed_type_invalid_implicit_conversion_size.sol │ │ │ ├── 316_fixed_type_invalid_implicit_conversion_lost_data.sol │ │ │ ├── 317_fixed_type_valid_explicit_conversions.sol │ │ │ ├── 318_invalid_array_declaration_with_rational.sol │ │ │ ├── 319_invalid_array_declaration_with_signed_fixed_type.sol │ │ │ ├── 320_invalid_array_declaration_with_unsigned_fixed_type.sol │ │ │ ├── 321_rational_to_bytes_implicit_conversion.sol │ │ │ ├── 322_fixed_to_bytes_implicit_conversion.sol │ │ │ ├── 323_mapping_with_fixed_literal.sol │ │ │ ├── 324_fixed_points_inside_structs.sol │ │ │ ├── 327_rational_index_access.sol │ │ │ ├── 328_rational_to_fixed_literal_expression.sol │ │ │ ├── 329_rational_as_exponent_value_signed.sol │ │ │ ├── 330_rational_as_exponent_value_unsigned.sol │ │ │ ├── 331_rational_as_exponent_half.sol │ │ │ ├── 332_rational_as_exponent_value_neg_quarter.sol │ │ │ ├── 333_fixed_point_casting_exponents_15.sol │ │ │ ├── 334_fixed_point_casting_exponents_neg.sol │ │ │ ├── 338_rational_bitnot_unary_operation.sol │ │ │ ├── 339_rational_bitor_binary_operation.sol │ │ │ ├── 340_rational_bitxor_binary_operation.sol │ │ │ ├── 341_rational_bitand_binary_operation.sol │ │ │ ├── 342_missing_bool_conversion.sol │ │ │ ├── 343_integer_and_fixed_interaction.sol │ │ │ ├── 344_one_divided_by_three_integer_conversion.sol │ │ │ ├── 345_unused_return_value.sol │ │ │ ├── 346_unused_return_value_send.sol │ │ │ ├── 347_unused_return_value_call.sol │ │ │ ├── 348_unused_return_value_call_value.sol │ │ │ ├── 350_unused_return_value_delegatecall.sol │ │ │ ├── 351_callcode_deprecated.sol │ │ │ ├── 353_callcode_not_deprecated_as_function.sol │ │ │ ├── 354_payable_in_library.sol │ │ │ ├── 355_payable_external.sol │ │ │ ├── 356_payable_internal.sol │ │ │ ├── 357_payable_private.sol │ │ │ ├── 358_illegal_override_payable.sol │ │ │ ├── 359_illegal_override_payable_nonpayable.sol │ │ │ ├── 360_function_variable_mixin.sol │ │ │ ├── 361_calling_payable.sol │ │ │ ├── 362_calling_nonpayable.sol │ │ │ ├── 363_non_payable_constructor.sol │ │ │ ├── 366_invalid_array_as_statement.sol │ │ │ ├── 367_using_directive_for_missing_selftype.sol │ │ │ ├── 368_shift_constant_left_negative_rvalue.sol │ │ │ ├── 369_shift_constant_right_negative_rvalue.sol │ │ │ ├── 370_shift_constant_left_excessive_rvalue.sol │ │ │ ├── 371_shift_constant_right_excessive_rvalue.sol │ │ │ ├── 372_shift_constant_right_fractional.sol │ │ │ ├── 396_invalid_mobile_type.sol │ │ │ ├── 397_warns_msg_value_in_non_payable_public_function.sol │ │ │ ├── 398_does_not_warn_msg_value_in_payable_function.sol │ │ │ ├── 399_does_not_warn_msg_value_in_internal_function.sol │ │ │ ├── 400_does_not_warn_msg_value_in_library.sol │ │ │ ├── 401_does_not_warn_msg_value_in_modifier_following_non_payable_public_function.sol │ │ │ ├── 402_assignment_to_constant.sol │ │ │ ├── 403_return_structs.sol │ │ │ ├── 404_read_returned_struct.sol │ │ │ ├── 405_address_checksum_type_deduction.sol │ │ │ ├── 406_invalid_address_checksum.sol │ │ │ ├── 407_invalid_address_no_checksum.sol │ │ │ ├── 408_invalid_address_length_short.sol │ │ │ ├── 409_invalid_address_length_long.sol │ │ │ ├── 410_string_literal_not_convertible_to_address_as_assignment.sol │ │ │ ├── 411_string_literal_not_convertible_to_address_as_return_value.sol │ │ │ ├── 412_early_exit_on_fatal_errors.sol │ │ │ ├── 413_address_methods.sol │ │ │ ├── 414_interface.sol │ │ │ ├── 415_interface_functions.sol │ │ │ ├── 416_interface_function_bodies.sol │ │ │ ├── 417_interface_events.sol │ │ │ ├── 418_interface_inheritance.sol │ │ │ ├── 419_interface_structs.sol │ │ │ ├── 420_interface_variables.sol │ │ │ ├── 421_interface_function_parameters.sol │ │ │ ├── 422_interface_enums.sol │ │ │ ├── 423_using_interface.sol │ │ │ ├── 424_using_interface_complex.sol │ │ │ ├── 425_interface_implement_public_contract.sol │ │ │ ├── 426_throw_is_deprecated.sol │ │ │ ├── 428_bare_revert.sol │ │ │ ├── 429_revert_with_reason.sol │ │ │ ├── 430_bare_selfdestruct.sol │ │ │ ├── 431_bare_assert.sol │ │ │ ├── 432_bare_require.sol │ │ │ ├── 433_pure_statement_in_for_loop.sol │ │ │ ├── 434_pure_statement_check_for_regular_for_loop.sol │ │ │ ├── 438_unused_unnamed_function_parameter.sol │ │ │ ├── 441_unused_unnamed_return_parameter.sol │ │ │ ├── 442_named_return_parameter.sol │ │ │ ├── 443_named_return_parameter_with_explicit_return.sol │ │ │ ├── 444_unnamed_return_parameter_with_explicit_return.sol │ │ │ ├── 445_no_unused_warning_interface_arguments.sol │ │ │ ├── 446_no_unused_warning_abstract_arguments.sol │ │ │ ├── 447_no_unused_warnings.sol │ │ │ ├── 459_function_overload_is_not_shadowing.sol │ │ │ ├── 460_function_override_is_not_shadowing.sol │ │ │ ├── 461_event_parameter_cannot_shadow_state_variable.sol │ │ │ ├── 462_callable_crash.sol │ │ │ ├── 466_does_not_error_transfer_payable_fallback.sol │ │ │ ├── 467_does_not_error_transfer_regular_function.sol │ │ │ ├── 470_specified_storage_no_warn.sol │ │ │ ├── 471_unspecified_storage_fail.sol │ │ │ ├── 473_storage_location_non_array_or_struct_disallowed.sol │ │ │ ├── 474_storage_location_non_array_or_struct_disallowed_is_not_fatal.sol │ │ │ ├── 475_implicit_conversion_disallowed.sol │ │ │ ├── 476_too_large_arrays_for_calldata_external.sol │ │ │ ├── 477_too_large_arrays_for_calldata_internal.sol │ │ │ ├── 478_too_large_arrays_for_calldata_public.sol │ │ │ ├── 479_explicit_literal_to_memory_string_assignment.sol │ │ │ ├── 480_explicit_literal_to_storage_string_assignment.sol │ │ │ ├── 481_explicit_literal_to_unspecified_string_assignment.sol │ │ │ ├── 482_explicit_literal_to_unspecified_string.sol │ │ │ ├── 483_modifiers_access_storage_pointer.sol │ │ │ ├── 484_function_types_selector_1.sol │ │ │ ├── 485_function_types_selector_2.sol │ │ │ ├── 486_function_types_selector_3.sol │ │ │ ├── 487_function_types_selector_4.sol │ │ │ ├── 488_function_types_selector_5.sol │ │ │ ├── 489_function_types_selector_6.sol │ │ │ ├── 490_function_types_selector_7.sol │ │ │ ├── 491_using_this_in_constructor.sol │ │ │ ├── 492_do_not_crash_on_not_lvalue.sol │ │ │ ├── 493_builtin_keccak256_reject_gas.sol │ │ │ ├── 494_builtin_sha256_reject_gas.sol │ │ │ ├── 495_builtin_ripemd160_reject_gas.sol │ │ │ ├── 496_builtin_ecrecover_reject_gas.sol │ │ │ ├── 497_gasleft.sol │ │ │ ├── 498_msg_gas_deprecated.sol │ │ │ ├── 500_gasleft_shadowing_1.sol │ │ │ ├── 501_gasleft_shadowing_2.sol │ │ │ ├── 502_builtin_keccak256_reject_value.sol │ │ │ ├── 503_builtin_sha256_reject_value.sol │ │ │ ├── 504_builtin_ripemd160_reject_value.sol │ │ │ ├── 505_builtin_ecrecover_reject_value.sol │ │ │ ├── 506_large_storage_array_fine.sol │ │ │ ├── 507_large_storage_array_simple.sol │ │ │ ├── 508_large_storage_arrays_combined.sol │ │ │ ├── 509_large_storage_arrays_struct.sol │ │ │ ├── 510_large_storage_array_mapping.sol │ │ │ ├── 511_library_function_without_implementation_public.sol │ │ │ ├── 512_library_function_without_implementation_internal.sol │ │ │ ├── 513_library_function_without_implementation_private.sol │ │ │ ├── 514_using_for_with_non_library.sol │ │ │ ├── 515_experimental_pragma_empty.sol │ │ │ ├── 516_experimental_pragma_unknown_number_literal.sol │ │ │ ├── 517_experimental_pragma_unknown_string_literal.sol │ │ │ ├── 518_experimental_pragma_unknown_quoted_string_literal.sol │ │ │ ├── 519_experimental_pragma_empy_string_literal.sol │ │ │ ├── 520_experimental_pragma_multiple_same_line.sol │ │ │ ├── 521_experimental_pragma_test_warning.sol │ │ │ ├── 522_experimental_pragma_duplicate.sol │ │ │ ├── 523_reject_interface_creation.sol │ │ │ ├── 524_accept_library_creation.sol │ │ │ ├── 525_reject_interface_constructors.sol │ │ │ ├── 526_fallback_marked_external.sol │ │ │ ├── 527_fallback_marked_internal.sol │ │ │ ├── 528_fallback_marked_private.sol │ │ │ ├── 529_fallback_marked_public.sol │ │ │ ├── 530_tuple_invalid_literal_too_large_for_uint.sol │ │ │ ├── 531_tuple_invalid_literal_too_large_unassigned.sol │ │ │ ├── 532_tuple_invalid_literal_too_large_for_uint_multi.sol │ │ │ ├── 533_tuple_invalid_literal_too_large_exp.sol │ │ │ ├── 534_tuple_invalid_literal_too_large_expression.sol │ │ │ ├── 535_address_overload_resolution.sol │ │ │ ├── 536_array_length_invalid_expression_negative_bool.sol │ │ │ ├── 537_array_length_invalid_expression_int_divides_bool.sol │ │ │ ├── 538_array_length_invalid_expression_bool_divides_int.sol │ │ │ ├── 539_array_length_invalid_expression_scientific_literal.sol │ │ │ ├── 540_array_length_invalid_expression_division_by_zero.sol │ │ │ ├── 541_warn_about_address_members_on_contract_balance.sol │ │ │ ├── 542_warn_about_address_members_on_contract_transfer.sol │ │ │ ├── 543_warn_about_address_members_on_contract_send.sol │ │ │ ├── 544_warn_about_address_members_on_contract_call.sol │ │ │ ├── 545_warn_about_address_members_on_contract_callcode.sol │ │ │ ├── 546_warn_about_address_members_on_contract_delegatecall.sol │ │ │ ├── 547_warn_about_address_members_on_non_this_contract_balance.sol │ │ │ ├── 548_warn_about_address_members_on_non_this_contract_transfer.sol │ │ │ ├── 549_warn_about_address_members_on_non_this_contract_send.sol │ │ │ ├── 550_warn_about_address_members_on_non_this_contract_call.sol │ │ │ ├── 551_warn_about_address_members_on_non_this_contract_callcode.sol │ │ │ ├── 552_warn_about_address_members_on_non_this_contract_delegatecall.sol │ │ │ ├── 559_no_warning_for_using_members_that_look_like_address_members.sol │ │ │ ├── 560_event_emit_simple.sol │ │ │ ├── 561_event_emit_complex.sol │ │ │ ├── 562_event_emit_foreign_class.sol │ │ │ ├── 563_event_without_emit_deprecated.sol │ │ │ ├── 568_blockhash.sol │ │ │ ├── 569_block_blockhash_deprecated.sol │ │ │ ├── 570_function_type_undeclared_type.sol │ │ │ ├── 571_function_type_undeclared_type_external.sol │ │ │ ├── 572_function_type_undeclared_type_multi_nested.sol │ │ │ ├── 573_similar_name_longer_than_80_not_suggested.sol │ │ │ ├── 574_similar_name_shorter_than_80_suggested.sol │ │ │ ├── 575_member_member_getter_call_without_parentheses.sol │ │ │ ├── 576_member_getter_call_without_parentheses.sol │ │ │ ├── 577_member_getter_call_without_parentheses_missing_function.sol │ │ │ ├── 578_private_member_getter_call_without_parentheses.sol │ │ │ ├── 579_member_getter_call_without_parentheses_private_function.sol │ │ │ ├── 580_improve_name_suggestion_one_and_two_letters.sol │ │ │ ├── 581_improve_name_suggestion_three_letters.sol │ │ │ ├── 582_improve_name_suggestion_four_letters.sol │ │ │ ├── 583_abi_encode_packed_with_rational_number_constant.sol │ │ │ ├── 584_abi_decode_with_tuple_of_other_than_types.sol │ │ │ ├── 585_abi_decode_with_unsupported_types.sol │ │ │ ├── 587_event_param_type_outside_storage.sol │ │ │ ├── compoundAssignment │ │ │ │ ├── incomp_types.sol │ │ │ │ ├── tuple.sol │ │ │ │ └── tuple_invalid_inline_array_type.sol │ │ │ ├── constant_mapping.sol │ │ │ ├── invalidArgs │ │ │ │ ├── creating_memory_array.sol │ │ │ │ ├── creating_struct.sol │ │ │ │ ├── creating_struct_members_skipped.sol │ │ │ │ └── explicit_conversions.sol │ │ │ ├── invalidTypes │ │ │ │ ├── conditional_expression.sol │ │ │ │ └── constructor_call.sol │ │ │ ├── no_effect_statements.sol │ │ │ ├── shadowsBuiltin │ │ │ │ ├── events.sol │ │ │ │ ├── functions.sol │ │ │ │ ├── global_scope.sol │ │ │ │ ├── ignores_constructor.sol │ │ │ │ ├── ignores_struct.sol │ │ │ │ ├── parameters.sol │ │ │ │ ├── return_parameters.sol │ │ │ │ ├── storage_variables.sol │ │ │ │ ├── this_super.sol │ │ │ │ └── variables.sol │ │ │ ├── typeChecking │ │ │ │ ├── function_call.sol │ │ │ │ ├── return.sol │ │ │ │ ├── return_tuple_not_convertible.sol │ │ │ │ ├── return_wrong_number.sol │ │ │ │ └── return_wrong_type.sol │ │ │ └── warnUnused │ │ │ │ ├── function_parameter.sol │ │ │ │ ├── local.sol │ │ │ │ ├── local_assignment.sol │ │ │ │ └── return_parameter.sol │ │ ├── natspec │ │ │ ├── docstring_empty_description.sol │ │ │ ├── docstring_empty_tag.sol │ │ │ ├── docstring_parameter.sol │ │ │ └── invalid │ │ │ │ └── docstring_parameter.sol │ │ ├── parsing │ │ │ ├── address_constant_payable.sol │ │ │ ├── address_function_arguments_and_returns.sol │ │ │ ├── address_in_struct.sol │ │ │ ├── address_invalid_state_mutability.sol │ │ │ ├── address_nonpayable.sol │ │ │ ├── address_payable.sol │ │ │ ├── address_payable_constant.sol │ │ │ ├── address_payable_conversion.sol │ │ │ ├── address_payable_function_type.sol │ │ │ ├── address_payable_library.sol │ │ │ ├── address_payable_local.sol │ │ │ ├── address_payable_state_variable.sol │ │ │ ├── address_payable_struct.sol │ │ │ ├── address_payable_type_expression.sol │ │ │ ├── address_public_payable_error.sol │ │ │ ├── arrays_in_events.sol │ │ │ ├── arrays_in_expressions.sol │ │ │ ├── arrays_in_storage.sol │ │ │ ├── assembly_evmasm_type.sol │ │ │ ├── assembly_invalid_type.sol │ │ │ ├── calling_function.sol │ │ │ ├── comment_end_with_double_star.sol │ │ │ ├── conditional_multiple.sol │ │ │ ├── conditional_true_false_literal.sol │ │ │ ├── conditional_with_assignment.sol │ │ │ ├── conditional_with_constants.sol │ │ │ ├── conditional_with_variables.sol │ │ │ ├── constant_is_keyword.sol │ │ │ ├── constant_state_modifier.sol │ │ │ ├── constructor_allowed_this.sol │ │ │ ├── constructor_super.sol │ │ │ ├── declaring_fixed_and_ufixed_variables.sol │ │ │ ├── declaring_fixed_literal_variables.sol │ │ │ ├── elemantary_non_address_payable_state_variable.sol │ │ │ ├── elementary_non_address_payable_argument.sol │ │ │ ├── elementary_non_address_payable_local.sol │ │ │ ├── elementary_non_address_payable_return.sol │ │ │ ├── else_if_statement.sol │ │ │ ├── emit_without_event.sol │ │ │ ├── empty_comment.sol │ │ │ ├── empty_enum.sol │ │ │ ├── empty_function.sol │ │ │ ├── enum_from_interface.sol │ │ │ ├── enum_from_interface_in_library.sol │ │ │ ├── enum_from_library.sol │ │ │ ├── enum_inheritance_contract.sol │ │ │ ├── enum_inheritance_interface.sol │ │ │ ├── enum_valid_declaration.sol │ │ │ ├── event.sol │ │ │ ├── event_arguments.sol │ │ │ ├── event_arguments_indexed.sol │ │ │ ├── event_with_no_argument_list.sol │ │ │ ├── exp_expression.sol │ │ │ ├── external_function.sol │ │ │ ├── external_variable.sol │ │ │ ├── fallback_function.sol │ │ │ ├── fixed_literal_with_double_radix.sol │ │ │ ├── for_loop_simple_initexpr.sol │ │ │ ├── for_loop_simple_noexpr.sol │ │ │ ├── for_loop_single_stmt_body.sol │ │ │ ├── for_loop_vardef_initexpr.sol │ │ │ ├── from_is_not_keyword.sol │ │ │ ├── function_no_body.sol │ │ │ ├── function_normal_comments.sol │ │ │ ├── function_type_as_parameter.sol │ │ │ ├── function_type_as_storage_variable.sol │ │ │ ├── function_type_as_storage_variable_with_assignment.sol │ │ │ ├── function_type_as_storage_variable_with_modifiers.sol │ │ │ ├── function_type_in_expression.sol │ │ │ ├── function_type_in_struct.sol │ │ │ ├── function_type_state_variable.sol │ │ │ ├── if_statement.sol │ │ │ ├── import_complex.sol │ │ │ ├── import_complex_invalid_from.sol │ │ │ ├── import_complex_without_from.sol │ │ │ ├── import_empty.sol │ │ │ ├── import_invalid_token.sol │ │ │ ├── import_simple.sol │ │ │ ├── inline_array_declaration.sol │ │ │ ├── inline_array_empty_cells_check_lvalue.sol │ │ │ ├── inline_array_empty_cells_check_without_lvalue.sol │ │ │ ├── interface_basic.sol │ │ │ ├── invalid_fixed_conversion_leading_zeroes_check.sol │ │ │ ├── lexer_numbers_with_underscores_decimal.sol │ │ │ ├── lexer_numbers_with_underscores_decimal_fail.sol │ │ │ ├── lexer_numbers_with_underscores_fixed.sol │ │ │ ├── lexer_numbers_with_underscores_fixed_fail.sol │ │ │ ├── lexer_numbers_with_underscores_hex.sol │ │ │ ├── lexer_numbers_with_underscores_hex_fail.sol │ │ │ ├── library_simple.sol │ │ │ ├── literal_constants_with_ether_subdenominations.sol │ │ │ ├── literal_constants_with_ether_subdenominations_in_expressions.sol │ │ │ ├── local_const_variable.sol │ │ │ ├── location_specifiers_for_locals.sol │ │ │ ├── location_specifiers_for_locals_multi.sol │ │ │ ├── location_specifiers_for_params.sol │ │ │ ├── location_specifiers_for_params_multi.sol │ │ │ ├── location_specifiers_for_state_variables.sol │ │ │ ├── location_specifiers_for_state_variables_multi.sol │ │ │ ├── location_specifiers_with_var.sol │ │ │ ├── malformed_enum_declaration.sol │ │ │ ├── mapping.sol │ │ │ ├── mapping_and_array_of_functions.sol │ │ │ ├── mapping_from_address_payable.sol │ │ │ ├── mapping_in_struct.sol │ │ │ ├── mapping_nonelementary_key_1.sol │ │ │ ├── mapping_nonelementary_key_2.sol │ │ │ ├── mapping_nonelementary_key_3.sol │ │ │ ├── mapping_nonelementary_key_4.sol │ │ │ ├── mapping_to_mapping_in_struct.sol │ │ │ ├── missing_argument_in_named_args.sol │ │ │ ├── missing_parameter_name_in_named_args.sol │ │ │ ├── missing_variable_name_in_declaration.sol │ │ │ ├── modifier.sol │ │ │ ├── modifier_arguments.sol │ │ │ ├── modifier_invocation.sol │ │ │ ├── modifier_without_semicolon.sol │ │ │ ├── multi_arrays.sol │ │ │ ├── multi_variable_declarations.sol │ │ │ ├── multiple_event_arg_trailing_comma.sol │ │ │ ├── multiple_function_param_trailing_comma.sol │ │ │ ├── multiple_functions_natspec_documentation.sol │ │ │ ├── multiple_modifier_arg_trailing_comma.sol │ │ │ ├── multiple_return_param_trailing_comma.sol │ │ │ ├── multiple_statemutability_specifiers.sol │ │ │ ├── new_address_payable.sol │ │ │ ├── new_invalid_type_name.sol │ │ │ ├── no_function_params.sol │ │ │ ├── overloaded_functions.sol │ │ │ ├── payable_accessor.sol │ │ │ ├── placeholder_in_function_context.sol │ │ │ ├── pragma_illegal.sol │ │ │ ├── return_var.sol │ │ │ ├── scientific_notation.sol │ │ │ ├── single_event_arg_trailing_comma.sol │ │ │ ├── single_function_param.sol │ │ │ ├── single_function_param_trailing_comma.sol │ │ │ ├── single_modifier_arg_trailing_comma.sol │ │ │ ├── single_return_param_trailing_comma.sol │ │ │ ├── smoke_test.sol │ │ │ ├── struct_definition.sol │ │ │ ├── trailing_comma_in_named_args.sol │ │ │ ├── trailing_dot1.sol │ │ │ ├── trailing_dot2.sol │ │ │ ├── trailing_dot3.sol │ │ │ ├── tuples.sol │ │ │ ├── tuples_decl_without_rhs.sol │ │ │ ├── tuples_without_commas.sol │ │ │ ├── two_exact_functions.sol │ │ │ ├── unary_plus_expression.sol │ │ │ ├── var_array.sol │ │ │ ├── var_in_function_arguments.sol │ │ │ ├── var_storage_var.sol │ │ │ ├── variable_definition_in_mapping.sol │ │ │ ├── visibility_specifiers.sol │ │ │ └── while_loop.sol │ │ ├── pragma │ │ │ ├── invalid_pragma.sol │ │ │ └── unknown_pragma.sol │ │ ├── returnExpressions │ │ │ ├── single_return_mismatching_number.sol │ │ │ ├── single_return_mismatching_number_named.sol │ │ │ ├── single_return_mismatching_type.sol │ │ │ ├── tuple_return_mismatching_number.sol │ │ │ ├── tuple_return_mismatching_number_named.sol │ │ │ └── valid_returns.sol │ │ ├── scoping │ │ │ ├── double_function_declaration.sol │ │ │ ├── double_variable_declaration_disjoint_scope.sol │ │ │ ├── double_variable_declaration_disjoint_scope_activation.sol │ │ │ ├── double_variable_declaration_same_and_disjoint_scope.sol │ │ │ ├── double_variable_declaration_same_scope.sol │ │ │ ├── function_state_variable_conflict.sol │ │ │ ├── name_shadowing.sol │ │ │ ├── poly_variable_declaration_same_scope.sol │ │ │ ├── scoping.sol │ │ │ ├── scoping_activation.sol │ │ │ ├── scoping_activation_old.sol │ │ │ ├── scoping_for.sol │ │ │ ├── scoping_for2.sol │ │ │ ├── scoping_for3.sol │ │ │ ├── scoping_for_decl_in_body.sol │ │ │ ├── scoping_old.sol │ │ │ ├── scoping_self_use.sol │ │ │ ├── state_variable_function_conflict.sol │ │ │ └── state_variable_function_conflict_former_crash.sol │ │ ├── signed_rational_modulus.sol │ │ ├── smoke_test.sol │ │ ├── specialFunctions │ │ │ ├── abi_encodePacked_structs_v2.sol │ │ │ ├── abi_encode_structs.sol │ │ │ ├── abi_encode_structs_abiv2.sol │ │ │ ├── abi_functions_member_access.sol │ │ │ ├── abidecode │ │ │ │ ├── abi_decode_calldata.sol │ │ │ │ ├── abi_decode_empty.sol │ │ │ │ ├── abi_decode_invalid_arg_count.sol │ │ │ │ ├── abi_decode_invalid_arg_type.sol │ │ │ │ ├── abi_decode_memory.sol │ │ │ │ ├── abi_decode_memory_v2.sol │ │ │ │ ├── abi_decode_nontuple.sol │ │ │ │ ├── abi_decode_simple.sol │ │ │ │ ├── abi_decode_single_return.sol │ │ │ │ ├── abi_decode_singletontuple.sol │ │ │ │ └── abi_decode_storage.sol │ │ │ ├── encodePacked_array_of_structs.sol │ │ │ ├── encodePacked_dynamic_string_array_v2.sol │ │ │ ├── encode_array_of_struct.sol │ │ │ ├── single_non_bytes_arg.sol │ │ │ ├── types_with_unspecified_encoding_internal_functions.sol │ │ │ ├── types_with_unspecified_encoding_special_types.sol │ │ │ ├── types_with_unspecified_encoding_structs.sol │ │ │ ├── types_with_unspecified_encoding_types.sol │ │ │ └── types_without_encoding_problems.sol │ │ ├── string │ │ │ ├── string_escapes.sol │ │ │ ├── string_new_line.sol │ │ │ ├── string_terminated_by_backslash.sol │ │ │ ├── string_unterminated.sol │ │ │ └── string_unterminated_no_new_line.sol │ │ ├── structs │ │ │ ├── array_calldata.sol │ │ │ ├── calldata.sol │ │ │ ├── calldata_array_assign.sol │ │ │ ├── calldata_assign.sol │ │ │ ├── calldata_dynamic.sol │ │ │ ├── calldata_struct_function_type.sol │ │ │ ├── memory_to_calldata.sol │ │ │ └── recursion │ │ │ │ ├── multi_struct_composition.sol │ │ │ │ ├── parallel_structs.sol │ │ │ │ ├── recursive_struct_as_contract_function_parameter.sol │ │ │ │ ├── recursive_struct_as_library_function_parameter.sol │ │ │ │ ├── recursive_struct_as_memory_library_function_parameter.sol │ │ │ │ ├── recursive_struct_forward_reference.sol │ │ │ │ ├── recursive_struct_with_internal_function_as_library_function_parameter.sol │ │ │ │ ├── return_recursive_structs.sol │ │ │ │ ├── return_recursive_structs2.sol │ │ │ │ ├── return_recursive_structs3.sol │ │ │ │ ├── struct_definition_directly_recursive.sol │ │ │ │ ├── struct_definition_directly_recursive_dynamic_array.sol │ │ │ │ ├── struct_definition_directly_recursive_fixed_array.sol │ │ │ │ ├── struct_definition_indirectly_recursive.sol │ │ │ │ ├── struct_definition_indirectly_recursive_complex.sol │ │ │ │ ├── struct_definition_indirectly_recursive_dynamic_array1.sol │ │ │ │ ├── struct_definition_indirectly_recursive_dynamic_array2.sol │ │ │ │ ├── struct_definition_indirectly_recursive_dynamic_array3.sol │ │ │ │ ├── struct_definition_indirectly_recursive_dynamic_multi_array.sol │ │ │ │ ├── struct_definition_indirectly_recursive_fixed_array1.sol │ │ │ │ ├── struct_definition_indirectly_recursive_fixed_array2.sol │ │ │ │ ├── struct_definition_indirectly_recursive_fixed_array3.sol │ │ │ │ ├── struct_definition_indirectly_recursive_fixed_multi_array.sol │ │ │ │ ├── struct_definition_not_really_recursive.sol │ │ │ │ ├── struct_definition_not_really_recursive_array.sol │ │ │ │ └── struct_definition_recursion_via_mapping.sol │ │ ├── tight_packing_literals.sol │ │ ├── tight_packing_literals_fine.sol │ │ ├── tupleAssignments │ │ │ ├── double_storage_crash.sol │ │ │ ├── err_fill_assignment.sol │ │ │ ├── error_fill.sol │ │ │ ├── large_component_count.sol │ │ │ ├── nowarn_swap_memory.sol │ │ │ ├── nowarn_swap_storage_pointers.sol │ │ │ └── warn_multiple_storage_storage_copies.sol │ │ ├── types │ │ │ ├── address │ │ │ │ ├── address_abi_decode.sol │ │ │ │ ├── address_binary_operators.sol │ │ │ │ ├── address_constant.sol │ │ │ │ ├── address_constant_assignment.sol │ │ │ │ ├── address_in_struct_fail.sol │ │ │ │ ├── address_in_struct_fine.sol │ │ │ │ ├── address_members_in_contract.sol │ │ │ │ ├── address_nonpayable_selfdestruct.sol │ │ │ │ ├── address_payable_external_overload.sol │ │ │ │ ├── address_payable_internal_overload_nonpayable.sol │ │ │ │ ├── address_payable_internal_overload_payable.sol │ │ │ │ ├── address_payable_memory_array_conversion.sol │ │ │ │ ├── address_payable_public_overload.sol │ │ │ │ ├── address_payable_selfdestruct.sol │ │ │ │ ├── address_payable_storage_array_conversion.sol │ │ │ │ ├── address_payable_storage_array_conversion_fail.sol │ │ │ │ ├── address_to_contract.sol │ │ │ │ ├── address_to_contract_implicitly.sol │ │ │ │ ├── address_to_contract_payable_fallback.sol │ │ │ │ ├── address_to_payable_address.sol │ │ │ │ ├── address_to_payable_address_double.sol │ │ │ │ ├── address_tuple_fail.sol │ │ │ │ ├── address_tuple_fine.sol │ │ │ │ ├── bytes_long_to_payable_address.sol │ │ │ │ ├── bytes_short_to_payable_address.sol │ │ │ │ ├── bytes_to_payable_address.sol │ │ │ │ ├── contract_no_fallback_to_payable_address.sol │ │ │ │ ├── contract_non_payable_fallback_to_payable_address.sol │ │ │ │ ├── contract_payable_fallback_to_payable_address.sol │ │ │ │ ├── contract_payable_fallback_to_payable_address_implicitly.sol │ │ │ │ ├── contract_to_address.sol │ │ │ │ ├── contract_to_address_implicitly.sol │ │ │ │ ├── literal_to_address.sol │ │ │ │ ├── literal_to_payable_address.sol │ │ │ │ ├── nonpayable_address_to_contract_payable_fallback.sol │ │ │ │ ├── payable_address_to_address.sol │ │ │ │ └── uint_to_payable_address.sol │ │ │ ├── array_index_too_large.sol │ │ │ ├── bool_ops.sol │ │ │ ├── bytes0.sol │ │ │ ├── bytes1_to_uint256.sol │ │ │ ├── bytes256.sol │ │ │ ├── bytes32_to_uint32.sol │ │ │ ├── bytes33.sol │ │ │ ├── bytes_to_contract.sol │ │ │ ├── bytes_to_uint_same_size.sol │ │ │ ├── bytesm.sol │ │ │ ├── contract_to_base.sol │ │ │ ├── contract_to_base_base.sol │ │ │ ├── contract_to_derived.sol │ │ │ ├── contract_to_unrelated_contract.sol │ │ │ ├── cyclic_dependency_check_on_consts_exhausted.sol │ │ │ ├── cyclic_dependency_check_on_consts_good.sol │ │ │ ├── cyclic_dependency_check_on_struct_exhausted.sol │ │ │ ├── cyclic_dependency_check_on_struct_good.sol │ │ │ ├── decimal_literal_to_bytesXX_explicit.sol │ │ │ ├── decimal_literal_to_bytesXX_implicit.sol │ │ │ ├── empty_tuple_event.sol │ │ │ ├── empty_tuple_function.sol │ │ │ ├── empty_tuple_lvalue.sol │ │ │ ├── empty_tuple_lvalue_array.sol │ │ │ ├── encoding_fractional.sol │ │ │ ├── encoding_fractional_abiencoderv2.sol │ │ │ ├── encoding_packed_fractional.sol │ │ │ ├── encoding_packed_fractional_abiencoderv2.sol │ │ │ ├── function_call_fail.sol │ │ │ ├── function_call_fail2.sol │ │ │ ├── function_types │ │ │ │ ├── function_parameter_return_types_fail.sol │ │ │ │ ├── function_parameter_return_types_success.sol │ │ │ │ ├── function_state_mutability_fail.sol │ │ │ │ └── function_state_mutability_success.sol │ │ │ ├── hex_literal_to_bytesXX_different_size_explicit.sol │ │ │ ├── hex_literal_to_bytesXX_different_size_implicit.sol │ │ │ ├── hex_literal_to_bytesXX_same_size_explicit.sol │ │ │ ├── hex_literal_to_bytesXX_same_size_implicit.sol │ │ │ ├── index_access_for_bytes.sol │ │ │ ├── mapping │ │ │ │ ├── access_index_omitted.sol │ │ │ │ ├── argument_external.sol │ │ │ │ ├── argument_internal.sol │ │ │ │ ├── argument_private.sol │ │ │ │ ├── argument_public.sol │ │ │ │ ├── array_argument_external.sol │ │ │ │ ├── array_argument_internal.sol │ │ │ │ ├── array_argument_private.sol │ │ │ │ ├── array_argument_public.sol │ │ │ │ ├── assignment_local.sol │ │ │ │ ├── assignment_state_variable.sol │ │ │ │ ├── assignment_struct.sol │ │ │ │ ├── function_type_argument_external.sol │ │ │ │ ├── function_type_argument_internal.sol │ │ │ │ ├── function_type_return_external.sol │ │ │ │ ├── function_type_return_internal.sol │ │ │ │ ├── library_argument_external.sol │ │ │ │ ├── library_argument_internal.sol │ │ │ │ ├── library_argument_private.sol │ │ │ │ ├── library_argument_public.sol │ │ │ │ ├── library_array_argument_external.sol │ │ │ │ ├── library_array_argument_internal.sol │ │ │ │ ├── library_array_argument_private.sol │ │ │ │ ├── library_array_argument_public.sol │ │ │ │ ├── library_return_external.sol │ │ │ │ ├── library_return_internal.sol │ │ │ │ ├── library_return_private.sol │ │ │ │ ├── library_return_public.sol │ │ │ │ ├── mapping_array_data_location_function_param_external.sol │ │ │ │ ├── mapping_array_return_external.sol │ │ │ │ ├── mapping_array_return_internal.sol │ │ │ │ ├── mapping_array_return_public.sol │ │ │ │ ├── mapping_data_location_calldata.sol │ │ │ │ ├── mapping_data_location_default.sol │ │ │ │ ├── mapping_data_location_function_param_external.sol │ │ │ │ ├── mapping_data_location_function_param_internal.sol │ │ │ │ ├── mapping_data_location_function_param_public.sol │ │ │ │ ├── mapping_data_location_memory.sol │ │ │ │ ├── mapping_dynamic_key.sol │ │ │ │ ├── mapping_dynamic_key_public.sol │ │ │ │ ├── mapping_return_external.sol │ │ │ │ ├── mapping_return_internal.sol │ │ │ │ ├── mapping_return_public.sol │ │ │ │ └── mapping_return_public_memory.sol │ │ │ ├── no_singleton_tuple.sol │ │ │ ├── rational_negative_numerator_negative_exp.sol │ │ │ ├── rational_number_array_index_limit.sol │ │ │ ├── rational_number_bitshift_limit.sol │ │ │ ├── rational_number_div_limit.sol │ │ │ ├── rational_number_exp_limit_fail.sol │ │ │ ├── rational_number_exp_limit_fine.sol │ │ │ ├── rational_number_huge.sol │ │ │ ├── rational_number_huge_fail.sol │ │ │ ├── rational_number_literal_limit_1.sol │ │ │ ├── rational_number_literal_limit_2.sol │ │ │ ├── rational_number_literal_limit_3.sol │ │ │ ├── rational_number_literal_to_fixed_implicit.sol │ │ │ ├── rational_number_mul_limit.sol │ │ │ ├── rational_number_signed_to_unsigned.sol │ │ │ ├── rational_number_too_large.sol │ │ │ ├── too_small_negative_numbers.sol │ │ │ ├── uint256_to_bytes1.sol │ │ │ ├── uint32_to_bytes32.sol │ │ │ ├── unnamed_tuple_decl.sol │ │ │ ├── var_decl_val_mismatch.sol │ │ │ ├── var_empty_decl_0.sol │ │ │ ├── var_empty_decl_1.sol │ │ │ ├── var_empty_decl_2.sol │ │ │ ├── var_empty_decl_3.sol │ │ │ ├── var_type_invalid_rational.sol │ │ │ ├── var_type_suggest.sol │ │ │ ├── zero_literal_to_bytesXX_explicit.sol │ │ │ └── zero_literal_to_bytesXX_implicit.sol │ │ ├── unicode_escape_literals.sol │ │ ├── unimplemented_super_function.sol │ │ ├── unimplemented_super_function_derived.sol │ │ ├── unterminatedBlocks │ │ │ ├── one_dot.sol │ │ │ ├── one_dot_x.sol │ │ │ ├── zero_dot.sol │ │ │ └── zero_dot_x.sol │ │ ├── upper_case_hex_literals.sol │ │ ├── variableDeclaration │ │ │ ├── do_while.sol │ │ │ ├── else.sol │ │ │ ├── for.sol │ │ │ ├── if.sol │ │ │ └── while.sol │ │ ├── viewPure │ │ │ ├── view_pure_abi_encode.sol │ │ │ └── view_pure_abi_encode_arguments.sol │ │ ├── viewPureChecker │ │ │ ├── assembly.sol │ │ │ ├── builtin_functions.sol │ │ │ ├── builtin_functions_restrict_warning.sol │ │ │ ├── builtin_functions_view_fail.sol │ │ │ ├── call_internal_functions_fail.sol │ │ │ ├── call_internal_functions_success.sol │ │ │ ├── callvalue_nonpayable_assembly_fallback.sol │ │ │ ├── callvalue_nonpayable_assembly_function.sol │ │ │ ├── callvalue_nonpayable_assembly_function_internal.sol │ │ │ ├── callvalue_nonpayable_assembly_function_modifier.sol │ │ │ ├── callvalue_payable_assembly_fallback.sol │ │ │ ├── callvalue_payable_assembly_function.sol │ │ │ ├── callvalue_payable_assembly_function_modifier.sol │ │ │ ├── constant.sol │ │ │ ├── constant_restrict_warning.sol │ │ │ ├── creation_no_restrict_warning.sol │ │ │ ├── creation_view_fail.sol │ │ │ ├── function_types.sol │ │ │ ├── function_types_fail.sol │ │ │ ├── interface.sol │ │ │ ├── local_storage_variables.sol │ │ │ ├── local_storage_variables_fail.sol │ │ │ ├── mappings.sol │ │ │ ├── modifiers.sol │ │ │ ├── modifiers_fail.sol │ │ │ ├── msg_value_modifier.sol │ │ │ ├── msg_value_modifier_view.sol │ │ │ ├── overriding_fail.sol │ │ │ ├── overriding_no_restrict_warning.sol │ │ │ ├── read_storage_pure_fail.sol │ │ │ ├── returning_structs_fail.sol │ │ │ ├── returning_structs_no_restrict_warning.sol │ │ │ ├── selector.sol │ │ │ ├── selector_complex.sol │ │ │ ├── selector_complex2.sol │ │ │ ├── smoke_test.sol │ │ │ ├── suggest_pure.sol │ │ │ ├── suggest_view.sol │ │ │ └── write_storage_fail.sol │ │ ├── virtualLookup │ │ │ └── modifiers_in_libraries.sol │ │ └── visibility │ │ │ ├── external_library_function.sol │ │ │ ├── function_no_visibility.sol │ │ │ ├── interface │ │ │ ├── function_default.sol │ │ │ ├── function_external.sol │ │ │ ├── function_internal.sol │ │ │ ├── function_private.sol │ │ │ ├── function_public.sol │ │ │ └── interface_contract_function_default.sol │ │ │ └── library_self_delegatecall.sol │ └── util │ │ ├── TestFileParser.cpp │ │ ├── TestFileParser.h │ │ ├── TestFileParserTests.cpp │ │ ├── TestFunctionCall.cpp │ │ ├── TestFunctionCall.h │ │ └── TestFunctionCallTests.cpp ├── libyul │ ├── Common.cpp │ ├── Common.h │ ├── CompilabilityChecker.cpp │ ├── Inliner.cpp │ ├── Metrics.cpp │ ├── ObjectCompilerTest.cpp │ ├── ObjectCompilerTest.h │ ├── ObjectParser.cpp │ ├── Parser.cpp │ ├── StackReuseCodegen.cpp │ ├── YulInterpreterTest.cpp │ ├── YulInterpreterTest.h │ ├── YulOptimizerTest.cpp │ ├── YulOptimizerTest.h │ ├── objectCompiler │ │ ├── data.yul │ │ ├── datacopy.yul │ │ ├── dataoffset_code.yul │ │ ├── dataoffset_data.yul │ │ ├── dataoffset_self.yul │ │ ├── datasize_code.yul │ │ ├── datasize_data.yul │ │ ├── datasize_self.yul │ │ ├── namedObject.yul │ │ ├── namedObjectCode.yul │ │ ├── nested_optimizer.yul │ │ ├── simple.yul │ │ ├── simple_optimizer.yul │ │ ├── smoke.yul │ │ ├── subObject.yul │ │ └── subSubObject.yul │ ├── yulInterpreterTests │ │ ├── ambiguous_vars.yul │ │ ├── datacopy.yul │ │ ├── dataoffset.yul │ │ ├── datasize.yul │ │ ├── exp.yul │ │ ├── external_call.yul │ │ ├── function_calls.yul │ │ ├── loop.yul │ │ ├── recursive_function_for_loop.yul │ │ ├── simple_mstore.yul │ │ ├── smoke.yul │ │ └── switch_statement.yul │ └── yulOptimizerTests │ │ ├── blockFlattener │ │ ├── basic.yul │ │ ├── for_stmt.yul │ │ ├── if_stmt.yul │ │ ├── many_nested_blocks.yul │ │ └── switch_stmt.yul │ │ ├── commonSubexpressionEliminator │ │ ├── branches_for.yul │ │ ├── branches_if.yul │ │ ├── case2.yul │ │ ├── function_scopes.yul │ │ ├── non_movable_instr.yul │ │ ├── non_movable_instr2.yul │ │ ├── object_access.yul │ │ ├── scopes.yul │ │ ├── smoke.yul │ │ ├── trivial.yul │ │ ├── unassigned_return.yul │ │ ├── unassigned_variables.yul │ │ └── variable_for_variable.yul │ │ ├── controlFlowSimplifier │ │ ├── empty_if_movable_condition.yul │ │ ├── empty_if_non_movable_condition.yul │ │ ├── switch_only_default.yul │ │ ├── switch_remove_empty_all.yul │ │ ├── switch_remove_empty_case.yul │ │ ├── switch_remove_empty_cases.yul │ │ ├── switch_remove_empty_default_case.yul │ │ ├── switch_to_if.yul │ │ ├── terminating_for.yul │ │ ├── terminating_for_nested.yul │ │ ├── terminating_for_nested_reversed.yul │ │ ├── terminating_for_revert.yul │ │ ├── terminating_for_revert_plus_break.yul │ │ └── terminating_for_with_continue.yul │ │ ├── deadCodeEliminator │ │ ├── conditional_break.yul │ │ ├── early_break.yul │ │ ├── early_continue.yul │ │ ├── early_revert.yul │ │ ├── early_stop.yul │ │ ├── for_loop_init_decl.yul │ │ ├── function_after_revert.yul │ │ ├── nested_revert.yul │ │ ├── no_removal.yul │ │ ├── normal_break.yul │ │ ├── normal_continue.yul │ │ └── normal_stop.yul │ │ ├── disambiguator │ │ ├── for_statement.yul │ │ ├── funtion_call.yul │ │ ├── if_statement.yul │ │ ├── long_names.yul │ │ ├── smoke.yul │ │ ├── smoke_yul.yul │ │ ├── switch_statement.yul │ │ ├── variables.yul │ │ ├── variables_clash.yul │ │ └── variables_inside_functions.yul │ │ ├── equivalentFunctionCombiner │ │ ├── multiple_complex.yul │ │ ├── simple.yul │ │ ├── simple_different_vars.yul │ │ └── switch_case_order.yul │ │ ├── expressionInliner │ │ ├── complex_with_evm.yul │ │ ├── double_calls.yul │ │ ├── double_recursive_calls.yul │ │ ├── no_inline_mload.yul │ │ ├── no_move_with_sideeffects.yul │ │ ├── simple.yul │ │ └── with_args.yul │ │ ├── expressionJoiner │ │ ├── if_condition.yul │ │ ├── muli_wrong_order3.yul │ │ ├── multi.yul │ │ ├── multi_reference.yul │ │ ├── multi_wrong_order.yul │ │ ├── multi_wrong_order2.yul │ │ ├── no_replacement_across_blocks.yul │ │ ├── no_replacement_in_loop_condition1.yul │ │ ├── no_replacement_in_loop_condition2.yul │ │ ├── only_assignment.yul │ │ ├── reassignment.yul │ │ ├── simple.yul │ │ ├── single_wrong_order.yul │ │ ├── smoke.yul │ │ ├── switch_expression.yul │ │ └── triple.yul │ │ ├── expressionSimplifier │ │ ├── assigned_vars_multi.yul │ │ ├── combine_shift_and_and.yul │ │ ├── combine_shift_and_and_2.yul │ │ ├── combine_shift_and_and_3.yul │ │ ├── constant_propagation.yul │ │ ├── constants.yul │ │ ├── identity_rules_complex.yul │ │ ├── identity_rules_negative.yul │ │ ├── identity_rules_simple.yul │ │ ├── including_function_calls.yul │ │ ├── inside_for.yul │ │ ├── invariant.yul │ │ ├── mod_and_1.yul │ │ ├── mod_and_2.yul │ │ ├── not_applied_function_call_different_arguments.yul │ │ ├── not_applied_function_call_different_names.yul │ │ ├── not_applied_function_call_equality_not_movable.yul │ │ ├── not_applied_removes_non_constant_and_not_movable.yul │ │ ├── reassign.yul │ │ ├── remove_redundant_shift_masking.yul │ │ ├── replace_too_large_shift.yul │ │ ├── return_vars_zero.yul │ │ ├── reversed.yul │ │ ├── smoke.yul │ │ ├── unassigend_vars_multi.yul │ │ └── unassigned_vars.yul │ │ ├── expressionSplitter │ │ ├── control_flow.yul │ │ ├── inside_function.yul │ │ ├── object_access.yul │ │ ├── smoke.yul │ │ ├── switch.yul │ │ └── trivial.yul │ │ ├── forLoopInitRewriter │ │ ├── complex_pre.yul │ │ ├── empty_pre.yul │ │ ├── nested.yul │ │ └── simple.yul │ │ ├── fullInliner │ │ ├── double_inline.yul │ │ ├── inside_condition.yul │ │ ├── large_function_multi_use.yul │ │ ├── large_function_single_use.yul │ │ ├── long_names.yul │ │ ├── move_up_rightwards_argument.yul │ │ ├── multi_fun.yul │ │ ├── multi_fun_callback.yul │ │ ├── multi_return.yul │ │ ├── no_inline_into_big_function.yul │ │ ├── no_inline_into_big_global_context.yul │ │ ├── no_return.yul │ │ ├── not_inside_for.yul │ │ ├── pop_result.yul │ │ ├── recursion.yul │ │ └── simple.yul │ │ ├── fullSimplify │ │ ├── constant_propagation.yul │ │ ├── constants.yul │ │ ├── identity_rules_complex.yul │ │ ├── identity_rules_negative.yul │ │ ├── identity_rules_simple.yul │ │ ├── including_function_calls.yul │ │ ├── inside_for.yul │ │ ├── invariant.yul │ │ ├── mod_and_1.yul │ │ ├── mod_and_2.yul │ │ ├── not_applied_function_call_different_arguments.yul │ │ ├── not_applied_function_call_different_names.yul │ │ ├── not_applied_function_call_equality_not_movable.yul │ │ ├── not_applied_removes_non_constant_and_not_movable.yul │ │ ├── operations.yul │ │ ├── reversed.yul │ │ ├── signextend.yul │ │ └── smoke.yul │ │ ├── fullSuite │ │ ├── abi2.yul │ │ ├── abi_example1.yul │ │ ├── aztec.yul │ │ ├── medium.yul │ │ ├── reuse_vars_bug_in_simplifier.yul │ │ ├── ssaReverse.yul │ │ ├── ssaReverseComplex.yul │ │ ├── switch_inline.yul │ │ └── switch_inline_match_default.yul │ │ ├── functionGrouper │ │ ├── already_grouped.yul │ │ ├── empty_block.yul │ │ ├── grouped_but_not_ordered.yul │ │ ├── multi_fun_mixed.yul │ │ ├── nested_fun.yul │ │ ├── single_fun.yul │ │ └── smoke.yul │ │ ├── functionHoister │ │ ├── empty_block.yul │ │ ├── multi_mixed.yul │ │ ├── nested.yul │ │ ├── single.yul │ │ └── smoke.yul │ │ ├── mainFunction │ │ ├── empty_block.yul │ │ ├── multi_fun_mixed.yul │ │ ├── nested_fun.yul │ │ ├── sigle_fun.yul │ │ └── smoke.yul │ │ ├── redundantAssignEliminator │ │ ├── for.yul │ │ ├── for_branch.yul │ │ ├── for_break.yul │ │ ├── for_continue.yul │ │ ├── for_continue_2.yul │ │ ├── for_continue_3.yul │ │ ├── for_decl_inside_break_continue.yul │ │ ├── for_deep_noremove.yul │ │ ├── for_deep_simple.yul │ │ ├── for_multi_break.yul │ │ ├── for_nested.yul │ │ ├── for_rerun.yul │ │ ├── for_stmnts_after_break_continue.yul │ │ ├── function.yul │ │ ├── if.yul │ │ ├── if_overwrite_all_branches.yul │ │ ├── if_used_in_one_branch.yul │ │ ├── multi_assign.yul │ │ ├── multivar.yul │ │ ├── non_movable.yul │ │ ├── scopes.yul │ │ ├── simple.yul │ │ ├── switch_overwrite_in_all.yul │ │ ├── switch_overwrite_in_one.yul │ │ ├── switch_overwrite_use_combination.yul │ │ └── switch_unused.yul │ │ ├── rematerialiser │ │ ├── branches_for1.yul │ │ ├── branches_for2.yul │ │ ├── branches_if.yul │ │ ├── branches_switch.yul │ │ ├── cheap_caller.yul │ │ ├── do_not_move_out_of_scope.yul │ │ ├── do_remat_large_amounts_of_code_if_used_once.yul │ │ ├── for_break.yul │ │ ├── for_continue.yul │ │ ├── for_continue_2.yul │ │ ├── for_continue_with_assignment_in_post.yul │ │ ├── large_constant.yul │ │ ├── large_constant_used_once.yul │ │ ├── medium_sized_constant.yul │ │ ├── non_movable_function.yul │ │ ├── non_movable_instruction.yul │ │ ├── reassign.yul │ │ ├── reassignment.yul │ │ ├── smoke.yul │ │ ├── trivial.yul │ │ └── update_asignment_remat.yul │ │ ├── splitJoin │ │ ├── control_flow.yul │ │ ├── functions.yul │ │ └── smoke.yul │ │ ├── ssaAndBack │ │ ├── for_loop.yul │ │ ├── multi_assign.yul │ │ ├── multi_assign_if.yul │ │ ├── multi_assign_multi_var_if.yul │ │ ├── multi_assign_multi_var_switch.yul │ │ ├── multi_assign_switch.yul │ │ ├── simple.yul │ │ ├── single_assign_if.yul │ │ ├── single_assign_switch.yul │ │ ├── ssaReverse.yul │ │ └── two_vars.yul │ │ ├── ssaPlusCleanup │ │ ├── control_structures.yul │ │ ├── multi_reassign.yul │ │ └── multi_reassign_with_use.yul │ │ ├── ssaReverser │ │ ├── abi_example.yul │ │ └── simple.yul │ │ ├── ssaTransform │ │ ├── branches.yul │ │ ├── for_reassign_body.yul │ │ ├── for_reassign_init.yul │ │ ├── for_reassign_post.yul │ │ ├── for_simple.yul │ │ ├── function.yul │ │ ├── multi_assign.yul │ │ ├── multi_decl.yul │ │ ├── nested.yul │ │ ├── notransform.yul │ │ ├── simple.yul │ │ ├── switch.yul │ │ └── used.yul │ │ ├── stackCompressor │ │ ├── inlineInBlock.yul │ │ ├── inlineInFunction.yul │ │ └── noInline.yul │ │ ├── structuralSimplifier │ │ ├── bugfix_visit_after_change.yul │ │ ├── for_false_condition.sol │ │ ├── if_false_condition.yul │ │ ├── if_multi_unassigned_condition.yul │ │ ├── if_true_condition.yul │ │ ├── if_unassigned_condition.yul │ │ ├── nested.yul │ │ ├── switch_inline.yul │ │ ├── switch_inline_match_default.yul │ │ ├── switch_inline_no_match.yul │ │ ├── switch_inline_no_match_mixed.yul │ │ └── switch_no_remove_empty_case.yul │ │ ├── unusedPruner │ │ ├── functions.yul │ │ ├── intermediate_assignment.yul │ │ ├── intermediate_multi_assignment.yul │ │ ├── multi_assign.yul │ │ ├── multi_assignments.yul │ │ ├── multi_declarations.yul │ │ ├── multi_declare.yul │ │ ├── multi_partial_assignments.yul │ │ ├── pop.yul │ │ ├── smoke.yul │ │ └── trivial.yul │ │ ├── varDeclInitializer │ │ ├── ambiguous.yul │ │ ├── inside_func.yul │ │ ├── multi.yul │ │ ├── multi_assign.yul │ │ └── simple.yul │ │ ├── varNameCleaner │ │ ├── builtins.yul │ │ ├── function_names.yul │ │ ├── function_parameters.yul │ │ ├── function_scopes.yul │ │ ├── instructions.yul │ │ ├── name_stripping.yul │ │ ├── reshuffling-inverse.yul │ │ └── reshuffling.yul │ │ └── wordSizeTransform │ │ ├── constant_assignment.yul │ │ ├── function_call.yul │ │ ├── functional_instruction.yul │ │ └── if.yul ├── regression │ ├── .gitignore │ ├── fuzzer │ │ ├── basic_fail.sol │ │ ├── basic_pass.sol │ │ └── big_int.sol │ ├── interactive │ │ ├── balance.sol │ │ ├── basic.sol │ │ ├── binary_incr.sol │ │ ├── can_build_sum.sol │ │ ├── contract_address.sol │ │ ├── enums.sol │ │ ├── fail_by_init_blocknum.sol │ │ ├── fail_by_init_sender.sol │ │ ├── fail_by_init_value.sol │ │ ├── interleavings.sol │ │ ├── lockstep.sol │ │ ├── modifier_arg.sol │ │ ├── modifier_ctor.sol │ │ ├── modifier_iterative.sol │ │ ├── modifier_noarg.sol │ │ ├── modifier_retval.sol │ │ ├── multicontract.sol │ │ ├── multimodel.sol │ │ ├── nested_contract.sol │ │ ├── origin.sol │ │ ├── pay_to_contract.sol │ │ ├── private_call.sol │ │ ├── syntactic_sugar.sol │ │ └── value_calls.sol │ ├── inv │ │ ├── inv_checked.sol │ │ ├── inv_rolebased_fail.sol │ │ ├── inv_rolebased_no_roles.sol │ │ ├── inv_rolebased_pass.sol │ │ ├── inv_stateful.sol │ │ ├── inv_structure.sol │ │ ├── inv_types.sol │ │ ├── inv_unchecked.sol │ │ ├── library_inv.sol │ │ ├── non_universal_fail_1.sol │ │ ├── non_universal_fail_2.sol │ │ └── non_universal_pass.sol │ ├── klee │ │ ├── basic_fail.sol │ │ └── basic_pass.sol │ ├── lit.cfg │ ├── synth │ │ ├── auction_fail.sol │ │ ├── auction_pass.sol │ │ ├── stateful_fail.sol │ │ ├── stateful_pass.sol │ │ ├── stateless_fail.sol │ │ ├── stateless_pass.sol │ │ ├── struct_fail.sol │ │ ├── struct_pass.sol │ │ └── trivial.sol │ ├── tutorials │ │ ├── 2_fuzz.sol │ │ ├── 2_mc.sol │ │ ├── 3_buggy.sol │ │ ├── 3_fixed.sol │ │ └── 4_ex.sol │ └── verify │ │ ├── addr_of_retval.sol │ │ ├── bad_inheritance.sol │ │ ├── bal_of_retval.sol │ │ ├── basic.sol │ │ ├── binary_incr.sol │ │ ├── call_on_retval.sol │ │ ├── complex_inheritance_1.sol │ │ ├── complex_inheritance_2.sol │ │ ├── complex_inheritance_3.sol │ │ ├── complex_inheritance_4.sol │ │ ├── complex_inheritance_5.sol │ │ ├── concrete_addrs.sol │ │ ├── contract_const_alias.sol │ │ ├── contract_const_alias_mixed.sol │ │ ├── contract_model.sol │ │ ├── contract_pass.sol │ │ ├── crypto_eq.sol │ │ ├── crypto_neq.sol │ │ ├── def_rv_is_zero.sol │ │ ├── default_from_mg.sol │ │ ├── defensive_fails.sol │ │ ├── defensive_pass.sol │ │ ├── diamond_inheritance_1.sol │ │ ├── diamond_inheritance_2.sol │ │ ├── distinct_literals.sol │ │ ├── emit_error.sol │ │ ├── enum_cast.sol │ │ ├── escalate_reqs.sol │ │ ├── ext_call_casts.sol │ │ ├── fallback.sol │ │ ├── forward_address_fail_a.sol │ │ ├── forward_address_fail_b.sol │ │ ├── forward_address_pass.sol │ │ ├── func_to_lib.sol │ │ ├── getters.sol │ │ ├── handles_global_contracts.sol │ │ ├── handles_reentrance_failure.sol │ │ ├── inheritance.sol │ │ ├── inheritance_override_choice_1.sol │ │ ├── inherited_mod.sol │ │ ├── interleavings.sol │ │ ├── lib_byval.sol │ │ ├── maps.sol │ │ ├── member_inheritance.sol │ │ ├── mixed_override_pass.sol │ │ ├── mod_inheritance.sol │ │ ├── mod_superfunc.sol │ │ ├── modifier.sol │ │ ├── msg_value_semantics.sol │ │ ├── multicontract_fail.sol │ │ ├── multicontract_pass.sol │ │ ├── multiple_override.sol │ │ ├── nd_lib_structs.sol │ │ ├── no_ctrt_sender.sol │ │ ├── no_send_to_contracts.sol │ │ ├── no_zero_senders.sol │ │ ├── override_fail.sol │ │ ├── override_gap.sol │ │ ├── override_mixed.sol │ │ ├── override_pass.sol │ │ ├── pay_pass.sol │ │ ├── reftest.sol │ │ ├── reqfail_in_lib.sol │ │ ├── revert.sol │ │ ├── securify │ │ ├── LICENSE │ │ ├── README.md │ │ └── input_validation │ │ │ ├── MissingInputValidation.sol │ │ │ ├── README.md │ │ │ ├── TODAmount.sol │ │ │ ├── TODReceiver.sol │ │ │ ├── TODTransfer.sol │ │ │ ├── UnrestrictedWrite.sol │ │ │ ├── decompile.sol │ │ │ └── reentrancy2.sol │ │ ├── send_fail.sol │ │ ├── send_success.sol │ │ ├── specialize_cast.sol │ │ ├── taint.sol │ │ ├── tuple_rotate.sol │ │ ├── tuple_rv_harness.sol │ │ ├── tuple_rv_internal.sol │ │ ├── unnamed_tuple_rv.sol │ │ ├── unnamed_w_modifiers.sol │ │ ├── unnamed_w_tuples.sol │ │ ├── using_lib.sol │ │ ├── value_call_fail_a.sol │ │ ├── value_call_fail_b.sol │ │ ├── value_call_pass.sol │ │ └── virtual_calls.sol ├── solcjsTests.sh └── tools │ ├── CMakeLists.txt │ ├── IsolTestOptions.cpp │ ├── IsolTestOptions.h │ ├── afl_fuzzer.cpp │ ├── fuzzer_common.cpp │ ├── fuzzer_common.h │ ├── isoltest.cpp │ ├── ossfuzz │ ├── CMakeLists.txt │ ├── README.md │ ├── config │ │ ├── solc_noopt_ossfuzz.options │ │ ├── solc_opt_ossfuzz.options │ │ ├── solidity.dict │ │ ├── strict_assembly.dict │ │ ├── strictasm_assembly_ossfuzz.options │ │ └── strictasm_opt_ossfuzz.options │ ├── const_opt_ossfuzz.cpp │ ├── protoToYul.cpp │ ├── protoToYul.h │ ├── solc_noopt_ossfuzz.cpp │ ├── solc_opt_ossfuzz.cpp │ ├── strictasm_assembly_ossfuzz.cpp │ ├── strictasm_diff_ossfuzz.cpp │ ├── strictasm_opt_ossfuzz.cpp │ ├── yulFuzzerCommon.cpp │ ├── yulFuzzerCommon.h │ ├── yulProto.proto │ ├── yulProtoFuzzer.cpp │ └── yulProto_diff_ossfuzz.cpp │ ├── yulInterpreter │ ├── CMakeLists.txt │ ├── EVMInstructionInterpreter.cpp │ ├── EVMInstructionInterpreter.h │ ├── Interpreter.cpp │ └── Interpreter.h │ ├── yulopti.cpp │ └── yulrun.cpp └── tutorials ├── .gitignore ├── 1_installation.md ├── 2_getting_started.md ├── 3_monitor.gv ├── 3_monitor.svg ├── 3_transactions.md ├── 4_arbitrary_clients.md ├── 5_client_data.md ├── 5_four_process.gv ├── 5_four_process.svg ├── 5_one_process.gv └── 5_one_process.svg /.dockerignore: -------------------------------------------------------------------------------- 1 | # out-of-tree builds usually go here. This helps improving performance of uploading 2 | # the build context to the docker image build server 3 | /build 4 | 5 | # in-tree builds 6 | /deps 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sol linguist-language=Solidity 2 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution Guidelines 2 | 3 | Please see our contribution guidelines in [the Solidity documentation](http://solidity.readthedocs.io/en/latest/contributing.html). 4 | 5 | Thank you for your help! 6 | -------------------------------------------------------------------------------- /cmake/toolchains/cxx17.cmake: -------------------------------------------------------------------------------- 1 | # Require C++17. 2 | set(CMAKE_CXX_STANDARD 17) 3 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 4 | set(CMAKE_CXX_EXTENSIONS OFF) 5 | -------------------------------------------------------------------------------- /cmake/toolchains/default.cmake: -------------------------------------------------------------------------------- 1 | # Require C++14. 2 | set(CMAKE_CXX_STANDARD 14) 3 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 4 | set(CMAKE_CXX_EXTENSIONS OFF) 5 | -------------------------------------------------------------------------------- /cmake/toolchains/libfuzzer.cmake: -------------------------------------------------------------------------------- 1 | # Require libfuzzer specific flags 2 | set(CMAKE_CXX_FLAGS "-O1 -gline-tables-only -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libstdc++") 3 | -------------------------------------------------------------------------------- /cmodelres/Interactive.cmake: -------------------------------------------------------------------------------- 1 | # A simple target to build the interactive model. 2 | add_executable(icmodel ${EXE_SRCS_COMMON} ${EXE_HARNESSED_CPP}) 3 | target_link_libraries(icmodel verify_interactive) 4 | -------------------------------------------------------------------------------- /cmodelres/yaml/sea.bv.yaml: -------------------------------------------------------------------------------- 1 | sea_options: 2 | 'bv-chc': '' 3 | -------------------------------------------------------------------------------- /cmodelres/yaml/sea.cex.yaml: -------------------------------------------------------------------------------- 1 | sea_options: 2 | 'bv-cex': '' 3 | '-g': '' 4 | -------------------------------------------------------------------------------- /cmodelres/yaml/sea.nlia.yaml: -------------------------------------------------------------------------------- 1 | sea_options: 2 | 'horn-strictly-la': 'false' 3 | 'horn-rewrite-div': 'true' 4 | -------------------------------------------------------------------------------- /docs/_templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | 3 | {% block menu %} 4 | {{ super() }} 5 | Keyword Index 6 | {% endblock %} 7 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx_rtd_theme>=0.3.1 2 | pygments-lexer-solidity>=0.3.1 3 | -------------------------------------------------------------------------------- /scripts/Dockerfile_alpine: -------------------------------------------------------------------------------- 1 | FROM alpine 2 | MAINTAINER chriseth 3 | 4 | COPY upload/solc-static-linux /usr/local/bin/solc 5 | ENTRYPOINT ["/usr/local/bin/solc"] 6 | -------------------------------------------------------------------------------- /scripts/bytecodecompare/deploy_key.enc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contract-ace/smartace/b6a012eac392fd229a984cb398c2b85c88d83c4a/scripts/bytecodecompare/deploy_key.enc -------------------------------------------------------------------------------- /scripts/codespell_whitelist.txt: -------------------------------------------------------------------------------- 1 | iff 2 | nd 3 | assignend 4 | uint 5 | mut 6 | -------------------------------------------------------------------------------- /scripts/download_ossfuzz_corpus.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -e 3 | cd /tmp 4 | git clone --depth 1 https://github.com/ethereum/solidity-fuzzing-corpus.git 5 | -------------------------------------------------------------------------------- /scripts/isoltest.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | REPO_ROOT="$(dirname "$0")"/.. 6 | exec ${REPO_ROOT}/build/test/tools/isoltest --testpath ${REPO_ROOT}/test 7 | -------------------------------------------------------------------------------- /scripts/travis-emscripten/deploy_key.enc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contract-ace/smartace/b6a012eac392fd229a984cb398c2b85c88d83c4a/scripts/travis-emscripten/deploy_key.enc -------------------------------------------------------------------------------- /test/cmdlineTests/object_compiler/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --optimize 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/object_compiler/err: -------------------------------------------------------------------------------- 1 | Warning: Yul and its optimizer are still experimental. Please use the output with care. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/object_compiler/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_default_success/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_default_success/input.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "Solidity", 3 | "sources": 4 | { 5 | "A": 6 | { 7 | "content": "pragma solidity >=0.0; contract C { function f() public pure {} }" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_default_success/output.json: -------------------------------------------------------------------------------- 1 | {"sources":{"A":{"id":0}}} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_method_identifiers_requested/output.json: -------------------------------------------------------------------------------- 1 | {"contracts":{"A":{"C":{"evm":{"methodIdentifiers":{"f()":"26121ff0"}}}}},"sources":{"A":{"id":0}}} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_missing_key_useLiteralContent/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_missing_key_useLiteralContent/output.json: -------------------------------------------------------------------------------- 1 | {"sources":{"A":{"id":0}}} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_optimizer_invalid_details/output.json: -------------------------------------------------------------------------------- 1 | {"errors":[{"component":"general","formattedMessage":"Unknown key \"notThere\"","message":"Unknown key \"notThere\"","severity":"error","type":"JSONError"}]} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_key_auxiliary_input/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_key_auxiliary_input/output.json: -------------------------------------------------------------------------------- 1 | {"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\"","message":"Unknown key \"key1\"","severity":"error","type":"JSONError"}]} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_key_metadata/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_key_metadata/output.json: -------------------------------------------------------------------------------- 1 | {"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\"","message":"Unknown key \"key1\"","severity":"error","type":"JSONError"}]} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_key_optimizer/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_key_optimizer/output.json: -------------------------------------------------------------------------------- 1 | {"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\"","message":"Unknown key \"key1\"","severity":"error","type":"JSONError"}]} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_key_root/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_key_root/input.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "Solidity", 3 | "key1": "test", 4 | "sources": 5 | { 6 | "A": 7 | { 8 | "content": "pragma solidity >=0.0; contract C { function f() public pure {} }" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_key_root/output.json: -------------------------------------------------------------------------------- 1 | {"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\"","message":"Unknown key \"key1\"","severity":"error","type":"JSONError"}]} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_key_settings/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_key_settings/output.json: -------------------------------------------------------------------------------- 1 | {"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\"","message":"Unknown key \"key1\"","severity":"error","type":"JSONError"}]} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_key_source/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_key_source/input.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "Solidity", 3 | "sources": 4 | { 5 | "A": 6 | { 7 | "key1": "test", 8 | "content": "pragma solidity >=0.0; contract C { function f() public pure {} }" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_key_source/output.json: -------------------------------------------------------------------------------- 1 | {"errors":[{"component":"general","formattedMessage":"Unknown key \"key1\"","message":"Unknown key \"key1\"","severity":"error","type":"JSONError"}]} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_auxiliary_input/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_auxiliary_input/output.json: -------------------------------------------------------------------------------- 1 | {"errors":[{"component":"general","formattedMessage":"\"auxiliaryInput\" must be an object","message":"\"auxiliaryInput\" must be an object","severity":"error","type":"JSONError"}]} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_auxiliary_input_smtlib2responses/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_auxiliary_input_smtlib2responses_member/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_metadata/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_metadata/output.json: -------------------------------------------------------------------------------- 1 | {"errors":[{"component":"general","formattedMessage":"\"settings.metadata\" must be an object","message":"\"settings.metadata\" must be an object","severity":"error","type":"JSONError"}]} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_optimizer/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_optimizer/output.json: -------------------------------------------------------------------------------- 1 | {"errors":[{"component":"general","formattedMessage":"\"settings.optimizer\" must be an object","message":"\"settings.optimizer\" must be an object","severity":"error","type":"JSONError"}]} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_output_selection/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_output_selection_contract/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_output_selection_file/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_output_selection_output/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_remappings/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_remappings_entry/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_root/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_root/input.json: -------------------------------------------------------------------------------- 1 | ["abc"] 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_root/output.json: -------------------------------------------------------------------------------- 1 | {"errors":[{"component":"general","formattedMessage":"Input is not a JSON object.","message":"Input is not a JSON object.","severity":"error","type":"JSONError"}]} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_settings/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_settings/output.json: -------------------------------------------------------------------------------- 1 | {"errors":[{"component":"general","formattedMessage":"\"settings\" must be an object","message":"\"settings\" must be an object","severity":"error","type":"JSONError"}]} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_source/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_source/output.json: -------------------------------------------------------------------------------- 1 | {"errors":[{"component":"general","formattedMessage":"\"sources.A\" must be an object","message":"\"sources.A\" must be an object","severity":"error","type":"JSONError"}]} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_sources/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_sources/input.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "Solidity", 3 | "sources": ["source1", "source2", "source3"] 4 | } 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_sources/output.json: -------------------------------------------------------------------------------- 1 | {"errors":[{"component":"general","formattedMessage":"\"sources\" is not a JSON object.","message":"\"sources\" is not a JSON object.","severity":"error","type":"JSONError"}]} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_wrong_type_useLiteralContent/exit: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/standard_yul_multiple_files/output.json: -------------------------------------------------------------------------------- 1 | {"errors":[{"component":"general","formattedMessage":"Yul mode only supports exactly one input file.","message":"Yul mode only supports exactly one input file.","severity":"error","type":"JSONError"}]} 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_jump/args: -------------------------------------------------------------------------------- 1 | --strict-assembly -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_jump/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/strict_asm_jump/input.sol: -------------------------------------------------------------------------------- 1 | { jump(1) } -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line_both_sides_short/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line_edge_in/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line_edge_in/input.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function ffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Ty, string A) onlyOwner external { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line_edge_out/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line_edge_out/input.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function fffffffffffffffffffffff(announcementTypeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Typ, string A) onlyOwner external { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line_left_short/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line_left_short/input.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(announcementType Type, string Announcement, string Link, bool Oppositable, string _str, uint256 _uint, address _addr) onlyOwner external { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line_multiline/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/too_long_line_right_short/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_stack_opt/args: -------------------------------------------------------------------------------- 1 | --strict-assembly --optimize 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_stack_opt/err: -------------------------------------------------------------------------------- 1 | Warning: Yul and its optimizer are still experimental. Please use the output with care. 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_stack_opt_disabled/args: -------------------------------------------------------------------------------- 1 | --strict-assembly 2 | -------------------------------------------------------------------------------- /test/cmdlineTests/yul_stack_opt_disabled/exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /test/compilationTests/MultiSigWallet/README.md: -------------------------------------------------------------------------------- 1 | MultiSigWallet contracts, originally from 2 | 3 | https://github.com/ConsenSys/MultiSigWallet 4 | -------------------------------------------------------------------------------- /test/compilationTests/corion/README.md: -------------------------------------------------------------------------------- 1 | CORION contracts, originally from 2 | 3 | https://github.com/CORIONplatform/solidity 4 | -------------------------------------------------------------------------------- /test/compilationTests/gnosis/README.md: -------------------------------------------------------------------------------- 1 | Gnosis contracts, originally from 2 | 3 | https://github.com/gnosis/gnosis-contracts 4 | -------------------------------------------------------------------------------- /test/compilationTests/milestonetracker/README.md: -------------------------------------------------------------------------------- 1 | Giveth milestone tracker, originally from 2 | 3 | https://github.com/Giveth/milestonetracker/ 4 | -------------------------------------------------------------------------------- /test/compilationTests/stringutils/README.md: -------------------------------------------------------------------------------- 1 | String utilities, originally from 2 | 3 | https://github.com/Arachnid/solidity-stringutils 4 | 5 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/array_type_name.sol: -------------------------------------------------------------------------------- 1 | contract C { uint[] i; } 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/constructor.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | constructor() public { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/enum_value.sol: -------------------------------------------------------------------------------- 1 | contract C { enum E { A, B } } 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/event_definition.sol: -------------------------------------------------------------------------------- 1 | contract C { event E(); } 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/fallback.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function() external payable { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/fallback_payable.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function() external {} 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/function_type.sol: -------------------------------------------------------------------------------- 1 | contract C { function f(function() external payable returns (uint) x) returns (function() external view returns (uint)) {} } 2 | 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/inheritance_specifier.sol: -------------------------------------------------------------------------------- 1 | contract C1 {} contract C2 is C1 {} 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/long_type_name_binary_operation.sol: -------------------------------------------------------------------------------- 1 | contract c { function f() public { uint a = 2 + 3; } } 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/long_type_name_identifier.sol: -------------------------------------------------------------------------------- 1 | contract c { uint[] a; function f() public { uint[] storage b = a; } } 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/modifier_definition.sol: -------------------------------------------------------------------------------- 1 | contract C { modifier M(uint i) { _; } function F() M(1) public {} } 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/modifier_invocation.sol: -------------------------------------------------------------------------------- 1 | contract C { modifier M(uint i) { _; } function F() M(1) public {} } 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/non_utf8.sol: -------------------------------------------------------------------------------- 1 | contract C { function f() public { var x = hex"ff"; } } 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/placeholder_statement.sol: -------------------------------------------------------------------------------- 1 | contract C { modifier M { _; } } 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/short_type_name.sol: -------------------------------------------------------------------------------- 1 | contract c { function f() public { uint[] memory x; } } 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/short_type_name_ref.sol: -------------------------------------------------------------------------------- 1 | contract c { function f() public { uint[][] memory rows; } } 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/smoke.sol: -------------------------------------------------------------------------------- 1 | contract C {} 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/source_location.sol: -------------------------------------------------------------------------------- 1 | contract C { function f() { var x = 2; x++; } } 2 | -------------------------------------------------------------------------------- /test/libsolidity/ASTJSON/using_for_directive.sol: -------------------------------------------------------------------------------- 1 | library L {} contract C { using L for uint; } 2 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/shifts.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(uint x) public returns (uint y) { 3 | assembly { y := shl(2, x) } 4 | } 5 | } 6 | // ==== 7 | // EVMVersion: >=constantinople 8 | // ---- 9 | // f(uint256): 7 -> 28 10 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/viaYul/return.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure returns (uint x) { 3 | return 7; 4 | x = 3; 5 | } 6 | } 7 | // ==== 8 | // compileViaYul: true 9 | // ---- 10 | // f() -> 7 11 | -------------------------------------------------------------------------------- /test/libsolidity/semanticTests/viaYul/smoke_test.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | } 3 | // ==== 4 | // compileViaYul: true 5 | // ---- 6 | // f() -> FAILURE 7 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/control_flow/assignment_in_declaration.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | contract C { 3 | function f() public pure { uint a = 2; assert(a == 2); } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/functions/functions_trivial_condition_for_only_call.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C 4 | { 5 | function f(bool x) public pure { for (;x;) {} } 6 | function g() public pure { f(true); } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/functions/functions_trivial_condition_if.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | contract C 3 | { 4 | function f(bool x) public pure { require(x); if (x) {} } 5 | } 6 | // ---- 7 | // Warning: (95-96): Condition is always true. 8 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/functions/functions_trivial_condition_require_only_call.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C 4 | { 5 | function f(bool x) public pure { require(x); } 6 | function g() public pure { f(true); } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/functions/functions_trivial_condition_while_only_call.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C 4 | { 5 | function f(bool x) public pure { while (x) {} } 6 | function g() public pure { f(true); } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/loops/for_loop_1.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | contract C { 3 | function f(uint x) public pure { 4 | require(x == 2); 5 | for (;;) {} 6 | assert(x == 2); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/loops/for_loop_2.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | contract C { 3 | function f(uint x) public pure { 4 | for (; x == 2; ) { 5 | assert(x == 2); 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/loops/for_loop_3.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | contract C { 3 | function f(uint x) public pure { 4 | for (uint y = 2; x < 10; ) { 5 | assert(y == 2); 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/operators/mod_even.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C 4 | { 5 | function f(uint x) public pure { 6 | require(x < 10000); 7 | uint y = x * 2; 8 | assert((y % 2) == 0); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/operators/mod_n.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C 4 | { 5 | function f(uint x, uint y) public pure { 6 | require(y > 0); 7 | uint z = x % y; 8 | assert(z < y); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/operators/mod_n_uint16.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C 4 | { 5 | function f(uint16 x, uint16 y) public pure { 6 | require(y > 0); 7 | uint z = x % y; 8 | assert(z < 100_000); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/overflow/safe_add_1.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C 4 | { 5 | function add(uint x, uint y) public pure returns (uint) { 6 | require(x + y >= x); 7 | return x + y; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/overflow/safe_add_2.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C 4 | { 5 | function add(uint x, uint y) public pure returns (uint) { 6 | uint z = x + y; 7 | require(z >= x); 8 | return z; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/simple/smoke_test.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | contract C { 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/special/msg_sender_1.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C 4 | { 5 | function f() public view { 6 | address a = msg.sender; 7 | address b = msg.sender; 8 | assert(a == b); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/types/bool_int_mixed_2.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | contract C { 3 | function f(bool x, uint a) public pure { 4 | require(!x || a > 0); 5 | uint b = a; 6 | assert(!x || b > 0); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/types/bool_simple_1.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | contract C { 3 | function f(bool x) public pure { 4 | assert(x); 5 | } 6 | } 7 | // ---- 8 | // Warning: (90-99): Assertion violation happens here 9 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/types/bool_simple_3.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | contract C { 3 | function f(bool x, bool y) public pure { 4 | bool z = x || y; 5 | assert(!(x && y) || z); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/types/bool_simple_5.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | contract C { 3 | function f(bool x) public pure { 4 | bool y = x; 5 | assert(x == y); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/types/bytes_2.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C 4 | { 5 | function f(bytes memory b1, bytes memory b2) public pure { 6 | b1 = b2; 7 | assert(b1[1] == b2[1]); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/types/contract_3.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C 4 | { 5 | function f(C c, C d, C e) public pure { 6 | require(c == d); 7 | require(d == e); 8 | assert(c == e); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/types/mapping_1.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C 4 | { 5 | mapping (uint => uint) map; 6 | function f(uint x) public { 7 | map[2] = x; 8 | assert(x == map[2]); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/types/tuple_declarations_empty.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C 4 | { 5 | function g() public pure { 6 | (uint x, ) = (2, 4); 7 | assert(x == 2); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/verification_target/simple_assert.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | contract C { 3 | function f(uint a) public pure { assert(a == 2); } 4 | } 5 | // ---- 6 | // Warning: (82-96): Assertion violation happens here 7 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTests/verification_target/simple_assert_with_require.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | contract C { 3 | function f(uint a) public pure { require(a < 10); assert(a < 20); } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTestsJSON/simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "auxiliaryInput": 3 | { 4 | "smtlib2responses": 5 | { 6 | "0xa66d08de30c873ca7d0e7e9e426f278640e0ee463a1aed2e4e80baee916b6869": "sat\n((|EVALEXPR_0| 0))\n" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/libsolidity/smtCheckerTestsJSON/simple.sol: -------------------------------------------------------------------------------- 1 | pragma experimental SMTChecker; 2 | 3 | contract C 4 | { 5 | function f(uint x) public pure { 6 | assert(x > 0); 7 | } 8 | } 9 | // ---- 10 | // Warning: (82-95): Assertion violation happens here 11 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/array_pop.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[] data; 3 | function test() public { 4 | data.pop(); 5 | } 6 | } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/bytes_pop.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | bytes data; 3 | function test() public { 4 | data.pop(); 5 | } 6 | } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/invalid/contract_index_access.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() view public { 3 | C[0]; 4 | } 5 | } 6 | // ---- 7 | // TypeError: (52-56): Index access for contracts or libraries is not possible. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/invalid/library_index_access.sol: -------------------------------------------------------------------------------- 1 | library C { 2 | function f() view public { 3 | C[0]; 4 | } 5 | } 6 | // ---- 7 | // TypeError: (51-55): Index access for contracts or libraries is not possible. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/bytes32_too_large.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | bytes32[8**90] ids; 3 | } 4 | // ---- 5 | // TypeError: (25-30): Invalid array length, expected integer literal or constant expression. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/bytes32_too_large_multidim.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | bytes32[8**90][500] ids; 3 | } 4 | // ---- 5 | // TypeError: (25-30): Invalid array length, expected integer literal or constant expression. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/can_be_constant_in_function.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint constant LEN = 10; 3 | function f() public pure { 4 | uint[LEN] memory a; 5 | a; 6 | } 7 | } 8 | // ---- 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/can_be_constant_in_struct.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint constant LEN = 10; 3 | struct Test { 4 | uint[LEN] ids; 5 | } 6 | } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/can_be_recursive_constant.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint constant L = 5; 3 | uint constant LEN = L + 4 * L; 4 | uint[LEN] ids; 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/cannot_be_function.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public {} 3 | uint[f] ids; 4 | } 5 | // ---- 6 | // TypeError: (49-50): Invalid array length, expected integer literal or constant expression. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/const_cannot_be_fractional.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | fixed constant L = 10.5; 3 | uint[L] ids; 4 | } 5 | // ---- 6 | // TypeError: (51-52): Array with fractional length specified. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/constant_var.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint constant LEN = 10; 3 | uint[LEN] ids; 4 | } 5 | // ---- -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/inline_array.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[[2]] a15; 3 | } 4 | // ---- 5 | // TypeError: (22-25): Invalid array length, expected integer literal or constant expression. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/invalid_expression_1.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[-true] ids; 3 | } 4 | // ---- 5 | // TypeError: (22-27): Invalid array length, expected integer literal or constant expression. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/invalid_expression_2.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[true/1] ids; 3 | } 4 | // ---- 5 | // TypeError: (22-28): Invalid array length, expected integer literal or constant expression. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/invalid_expression_3.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[1/true] ids; 3 | } 4 | // ---- 5 | // TypeError: (22-28): Invalid array length, expected integer literal or constant expression. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/invalid_expression_4.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[1.111111E1111111111111] ids; 3 | } 4 | // ---- 5 | // TypeError: (22-44): Invalid array length, expected integer literal or constant expression. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/invalid_expression_5.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[3/0] ids; 3 | } 4 | // ---- 5 | // TypeError: (22-25): Operator / not compatible with types int_const 3 and int_const 0 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/non_integer_constant_var.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | bool constant LEN = true; 3 | uint[LEN] ids; 4 | } 5 | // ---- 6 | // TypeError: (52-55): Invalid array length, expected integer literal or constant expression. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/not_convertible_to_integer.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[true] ids; 3 | } 4 | // ---- 5 | // TypeError: (22-26): Invalid array length, expected integer literal or constant expression. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/parameter_too_large.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(bytes32[1263941234127518272] memory) public pure {} 3 | } 4 | // ---- 5 | // TypeError: (26-61): Array is too large to be encoded. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/too_large.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[8**90] ids; 3 | } 4 | // ---- 5 | // TypeError: (22-27): Invalid array length, expected integer literal or constant expression. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/tuples.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[(1,2)] a15; 3 | } 4 | // ---- 5 | // TypeError: (22-27): Invalid array length, expected integer literal or constant expression. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/array/length/uint_too_large_multidim.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[8**90][500] ids; 3 | } 4 | // ---- 5 | // TypeError: (22-27): Invalid array length, expected integer literal or constant expression. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/bound/bound_call.sol: -------------------------------------------------------------------------------- 1 | library D { function double(uint self) internal pure returns (uint) { return 2*self; } } 2 | contract C { 3 | using D for uint; 4 | function f(uint a) public pure { 5 | a.double(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/bound/bound_no_call.sol: -------------------------------------------------------------------------------- 1 | library D { function double(uint self) public pure returns (uint) { return 2*self; } } 2 | contract C { 3 | using D for uint; 4 | function f(uint a) public pure { 5 | a.double; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/constants/cyclic_dependency_1.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint constant a = a; 3 | } 4 | // ---- 5 | // TypeError: (17-36): The value of the constant a has a cyclic dependency via a. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/constants/cyclic_dependency_4.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint constant a = b * c; 3 | uint constant b = 7; 4 | uint constant c = 4 + uint(keccak256(abi.encode(d))); 5 | uint constant d = 2 + b; 6 | } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/constants/mod_div_rational.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | fixed a1 = 0.1 % -0.4271087646484375; 3 | fixed a2 = 0.1 % 0.4271087646484375; 4 | fixed a3 = 0 / 0.123; 5 | fixed a4 = 0 / -0.123; 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/constructor/constructible_internal_constructor.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | constructor() internal {} 3 | } 4 | contract D is C { 5 | constructor() public { } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/constructor/constructor.sol: -------------------------------------------------------------------------------- 1 | contract A { constructor() public {} } 2 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/constructor/constructor_no_visibility.sol: -------------------------------------------------------------------------------- 1 | contract A { constructor() {} } 2 | // ---- 3 | // SyntaxError: (13-29): No visibility specified. Did you intend to add "public"? 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/constructor/constructor_without_implementation.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | constructor() public; 3 | } 4 | // ---- 5 | // TypeError: (14-35): Constructor must be implemented if declared. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/constructor/external_constructor.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | constructor() external {} 3 | } 4 | // ---- 5 | // TypeError: (17-42): Constructor must be public or internal. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/constructor/returns_in_constructor.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | constructor() public returns (uint a) { } 3 | } 4 | // ---- 5 | // TypeError: (46-54): Non-empty "returns" directive for constructor. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/constructor/two_constructors.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | constructor(uint) public { } 3 | constructor() public {} 4 | } 5 | // ---- 6 | // DeclarationError: (47-70): More than one constructor defined. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/controlFlow/mappingReturn/named_fine.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | mapping(uint=>uint) m; 3 | function f() internal view returns (mapping(uint=>uint) storage r) { r = m; } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/controlFlow/mappingReturn/unnamed_fine.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | mapping(uint=>uint) m; 3 | function f() internal view returns (mapping(uint=>uint) storage) { return m; } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/controlFlow/storageReturn/unimplemented_internal.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() internal returns(uint[] storage); 3 | function g() internal returns(uint[] storage s); 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/controlFlow/storageReturn/unimplemented_library.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | function f() public returns(uint[] storage); 3 | function g() public returns(uint[] storage s); 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/controlFlow/unreachableCode/comment_fine.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | return; 4 | // unreachable comment 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/controlFlow/unreachableCode/constant_condition.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | if (false) { 4 | return; // unreachable, but not yet detected 5 | } 6 | return; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/controlFlow/unreachableCode/double_return.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure returns (uint) { 3 | return 0; 4 | return 0; 5 | } 6 | } 7 | // ---- 8 | // Warning: (85-93): Unreachable code. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/controlFlow/unreachableCode/double_revert.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | revert(); 4 | revert(); 5 | } 6 | } 7 | // ---- 8 | // Warning: (70-78): Unreachable code. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/controlFlow/unreachableCode/revert.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | revert(); 4 | uint a = 0; a; 5 | } 6 | } 7 | // ---- 8 | // Warning: (70-83): Unreachable code. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/controlFlow/unreachableCode/revert_empty.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | revert(); 4 | for(int i = 0; i < 3; i++) { f(); } 5 | } 6 | } 7 | // ---- 8 | // Warning: (70-105): Unreachable code. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/conversion/allowed_conversion_to_bytes_array.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | bytes a; 3 | bytes b; 4 | function f() public view { 5 | bytes storage c = a; 6 | bytes memory d = b; 7 | d = bytes(c); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/conversion/allowed_conversion_to_string.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | string a; 3 | string b; 4 | function f() public view { 5 | string storage c = a; 6 | string memory d = b; 7 | d = string(c); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/conversion/conversion_to_bytes.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() public pure returns (bytes memory) { 3 | return bytes("abc"); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/conversion/implicit_conversion_from_storage_array_ref.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | int[10] x; 3 | int[] y; 4 | function f() public { 5 | y = x; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/dataLocations/data_location_in_function_type.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | struct Nested { uint y; } 3 | function c(function(Nested memory) external returns (uint)[] storage) external pure {} 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_calldata.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f(bytes calldata) external; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/dataLocations/internalFunction/function_argument_location_specifier_test_internal_memory.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f(bytes memory) internal; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/dataLocations/internalFunction/function_argument_location_specifier_test_internal_storage.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f(bytes storage) internal; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/dataLocations/libraryExternalFunction/function_argument_location_specifier_test_external_calldata.sol: -------------------------------------------------------------------------------- 1 | library test { 2 | function f(bytes calldata) external; 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/dataLocations/libraryExternalFunction/function_argument_location_specifier_test_external_storage.sol: -------------------------------------------------------------------------------- 1 | library test { 2 | function f(bytes storage) external; 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/dataLocations/libraryInternalFunction/function_argument_location_specifier_test_internal_memory.sol: -------------------------------------------------------------------------------- 1 | library test { 2 | function f(bytes memory) internal pure {} 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/dataLocations/libraryInternalFunction/function_argument_location_specifier_test_internal_storage.sol: -------------------------------------------------------------------------------- 1 | library test { 2 | function f(bytes storage) internal pure {} 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/dataLocations/publicFunction/function_argument_location_specifier_test_public_memory.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f(bytes memory) public; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/denominations/deprecated_year.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint constant a = 3 years; 3 | } 4 | // ---- 5 | // TypeError: (32-39): Using "years" as a unit denomination is deprecated. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/double_stateVariable_declaration.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint256 variable; 3 | uint128 variable; 4 | } 5 | // ---- 6 | // DeclarationError: (36-52): Identifier already declared. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/emit/emit_empty.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public { 3 | emit; 4 | } 5 | } 6 | // ---- 7 | // ParserError: (45-46): Expected event name or path. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/empty_struct.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | struct A {} 3 | } 4 | // ---- 5 | // SyntaxError: (17-28): Defining empty structs is disallowed. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/events/event_array_v2.sol: -------------------------------------------------------------------------------- 1 | pragma experimental ABIEncoderV2; 2 | contract c { 3 | event E(uint[]); 4 | } 5 | // ---- 6 | // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/events/event_nested_array_2.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event E(uint[2][]); 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/fallback/pure_modifier.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint x; 3 | function() external pure { x = 2; } 4 | } 5 | // ---- 6 | // TypeError: (29-64): Fallback function must be payable or non-payable, but is "pure". 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/fallback/view_modifier.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint x; 3 | function() external view { x = 2; } 4 | } 5 | // ---- 6 | // TypeError: (29-64): Fallback function must be payable or non-payable, but is "view". 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/functionTypes/call_value_on_payable_function_type.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function (uint) external payable returns (uint) x; 3 | function f() public { 4 | x.value(2)(1); 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/functionTypes/delete_external_function_type_invalid.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public { 3 | delete this.f; 4 | } 5 | } 6 | // ---- 7 | // TypeError: (54-60): Expression has to be an lvalue. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/functionTypes/delete_function_type_invalid.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public { 3 | delete f; 4 | } 5 | } 6 | // ---- 7 | // TypeError: (54-55): Expression has to be an lvalue. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/functionTypes/external_function_type_taking_internal.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function(function () internal) external x; 3 | } 4 | // ---- 5 | // TypeError: (26-47): Internal type cannot be used for external function type. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/functionTypes/external_function_type_to_address.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public view returns (address) { 3 | return address(this.f); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/functionTypes/function_type.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public { 3 | function(uint) returns (uint) x; 4 | x; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/functionTypes/function_type_internal_public_variable.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function(bytes memory) internal public a; 3 | } 4 | // ---- 5 | // TypeError: (17-57): Internal or recursive type is not allowed for public state variables. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/functionTypes/function_type_return_parameters_with_names.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function(uint) returns (bool ret) f; 3 | } 4 | // ---- 5 | // SyntaxError: (41-49): Return parameters in function types may not be named. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/functionTypes/function_type_returned.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure returns (function(uint) pure external returns (uint) g) { 3 | return g; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/functionTypes/function_type_struct.sol: -------------------------------------------------------------------------------- 1 | library L 2 | { 3 | struct Nested 4 | { 5 | uint y; 6 | } 7 | function f(function(Nested memory) external) external pure {} 8 | } 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/functionTypes/internal_function_as_external_parameter_in_library_internal.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | function f(function(uint) internal returns (uint) /*x*/) pure internal { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/functionTypes/payable_internal_function_type.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function (uint) internal payable returns (uint) x; 3 | } 4 | // ---- 5 | // TypeError: (17-66): Only external function types can be payable. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/functionTypes/warn_function_type_parameters_with_names.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function(uint a) f; 3 | } 4 | // ---- 5 | // Warning: (26-32): Naming function type parameters is deprecated. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/getter/complex_struct.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | struct Y { 3 | uint a; 4 | uint b; 5 | } 6 | mapping(uint256 => Y) public m; 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/getter/simple_struct.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | struct Y { 3 | uint b; 4 | } 5 | mapping(uint256 => Y) public m; 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/globalFunctions/sha3_no_call.sol: -------------------------------------------------------------------------------- 1 | contract C 2 | { 3 | function f(bytes memory data) public pure { 4 | sha3; 5 | } 6 | } 7 | // ---- 8 | // TypeError: (60-64): "sha3" has been deprecated in favour of "keccak256" 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/globalFunctions/suicide_no_call.sol: -------------------------------------------------------------------------------- 1 | contract C 2 | { 3 | function f(bytes memory data) public pure { 4 | suicide; 5 | } 6 | } 7 | // ---- 8 | // TypeError: (60-67): "suicide" has been deprecated in favour of "selfdestruct" 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/indexing/array_out_of_bounds_index.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public { 3 | bytes[32] memory a; 4 | a[64]; 5 | } 6 | } 7 | // ---- 8 | // TypeError: (65-70): Out of bounds array access. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/indexing/array_without_index.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public { 3 | bytes memory a; 4 | a[]; 5 | } 6 | } 7 | // ---- 8 | // TypeError: (61-64): Index expression cannot be omitted. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/indexing/fixedbytes_out_of_bounds_index.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public { 3 | bytes32 b; 4 | b[64]; 5 | } 6 | } 7 | // ---- 8 | // TypeError: (56-61): Out of bounds array access. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/indexing/fixedbytes_without_index.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public { 3 | bytes32 b; 4 | b[]; 5 | } 6 | } 7 | // ---- 8 | // TypeError: (56-59): Index expression cannot be omitted. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/indexing/function_type.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public { 3 | f[0]; 4 | } 5 | } 6 | // ---- 7 | // TypeError: (41-42): Indexed expression has to be a type, mapping or array (is function ()) 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/indexing/function_type_without_index.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public { 3 | f[]; 4 | } 5 | } 6 | // ---- 7 | // TypeError: (41-42): Indexed expression has to be a type, mapping or array (is function ()) 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/inheritance/allow_empty_duplicated_super_constructor_call.sol: -------------------------------------------------------------------------------- 1 | contract A { constructor() public { } } 2 | contract B is A { constructor() A() public { } } 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/inheritance/base_arguments_no_parentheses.sol: -------------------------------------------------------------------------------- 1 | contract Base { 2 | constructor(uint) public {} 3 | } 4 | contract Derived is Base(2) { } 5 | contract Derived2 is Base, Derived {} 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/inheritance/override/external_turns_public_no_params.sol: -------------------------------------------------------------------------------- 1 | contract A { 2 | function f() external pure {} 3 | } 4 | contract B is A { 5 | function f() public pure { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/inheritance/override/function_state_variable.sol: -------------------------------------------------------------------------------- 1 | interface ERC20 { function x() external returns (uint); } 2 | contract C is ERC20 { uint public x; } 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/inheritance/reference_non_base_ctor.sol: -------------------------------------------------------------------------------- 1 | contract X {} 2 | contract D { 3 | constructor() X(5) public {} 4 | } 5 | // ---- 6 | // TypeError: (45-49): Referenced declaration is neither modifier nor base class. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/inlineAssembly/assignment_from_contract.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | assembly { 4 | let x := C 5 | } 6 | } 7 | } 8 | // ---- 9 | // TypeError: (72-73): Expected a library. 10 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/inlineAssembly/assignment_from_functiontype.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | assembly { 4 | let x := f 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/inlineAssembly/assignment_from_library.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | } 3 | 4 | contract C { 5 | function f() public pure { 6 | assembly { 7 | let x := L 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/inlineAssembly/assignment_from_super.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | assembly { 4 | let x := super 5 | } 6 | } 7 | } 8 | // ---- 9 | // DeclarationError: (72-77): Identifier not found. 10 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/inlineAssembly/function_call_not_found.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | assembly { 4 | k() 5 | } 6 | } 7 | } 8 | // ---- 9 | // DeclarationError: (63-64): Function not found. 10 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/inlineAssembly/no_unused_variable_warning.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public { 3 | uint a; 4 | assembly { 5 | a := 1 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/literalOperations/division_by_zero.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint constant a = 1 / 0; 3 | } 4 | // ---- 5 | // TypeError: (35-40): Operator / not compatible with types int_const 1 and int_const 0 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/literalOperations/division_by_zero_complex.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint constant a = 1 / ((1+3)-4); 3 | } 4 | // ---- 5 | // TypeError: (35-48): Operator / not compatible with types int_const 1 and int_const 0 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/literalOperations/mod_zero.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint constant b3 = 1 % 0; 3 | } 4 | // ---- 5 | // TypeError: (36-41): Operator % not compatible with types int_const 1 and int_const 0 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/literalOperations/mod_zero_complex.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint constant b3 = 1 % (-4+((2)*2)); 3 | } 4 | // ---- 5 | // TypeError: (36-52): Operator % not compatible with types int_const 1 and int_const 0 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/literal_comparisons.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f(int8 x) public pure { 3 | if (x == 1) {} 4 | if (1 == x) {} 5 | } 6 | } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/memberLookup/internal_function_type.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function () internal returns (uint) x; 3 | constructor() public { 4 | C.x = g; 5 | } 6 | function g() public pure returns (uint) {} 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/memberLookup/msg_value_modifier_payable.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | modifier costs(uint _amount) { require(msg.value >= _amount); _; } 3 | function f() costs(1 ether) public payable {} 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/metaTypes/codeAccessIsConstant.sol: -------------------------------------------------------------------------------- 1 | contract Test { 2 | bytes constant c = type(B).creationCode; 3 | bytes constant r = type(B).runtimeCode; 4 | 5 | } 6 | contract B { function f() public pure {} } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/metaTypes/name.sol: -------------------------------------------------------------------------------- 1 | contract Test { 2 | function f() public pure returns (string memory) { 3 | return type(Test).name; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/metaTypes/name_constant.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | string public constant name = type(C).name; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierContractName.sol: -------------------------------------------------------------------------------- 1 | contract type { } 2 | // ---- 3 | // ParserError: (9-13): Expected identifier but got 'type' 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierFunction.sol: -------------------------------------------------------------------------------- 1 | contract Test { 2 | function type() public pure { 3 | } 4 | } 5 | // ---- 6 | // ParserError: (29-33): Expected identifier but got 'type' 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierParameter.sol: -------------------------------------------------------------------------------- 1 | contract Test { 2 | function f(uint type) public pure { 3 | } 4 | } 5 | // ---- 6 | // ParserError: (36-40): Expected ',' but got 'type' 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierStateVariable.sol: -------------------------------------------------------------------------------- 1 | contract Test { 2 | uint type; 3 | } 4 | // ---- 5 | // ParserError: (25-29): Expected identifier but got 'type' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/metaTypes/typeNotRegularIdentifierVariable.sol: -------------------------------------------------------------------------------- 1 | contract Test { 2 | function f() public pure { 3 | uint type; 4 | } 5 | } 6 | // ---- 7 | // ParserError: (60-64): Expected ';' but got 'type' 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/metaTypes/typeOfContract.sol: -------------------------------------------------------------------------------- 1 | contract Test { 2 | function f() public pure returns (bytes memory) { 3 | type(Test); 4 | } 5 | } 6 | // ---- 7 | // Warning: (78-88): Statement has no effect. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/modifiers/function_modifier_double_invocation.sol: -------------------------------------------------------------------------------- 1 | contract B { 2 | function f(uint x) mod(x) mod(2) public pure { } 3 | modifier mod(uint a) { if (a > 0) _; } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/modifiers/illegal_modifier_override.sol: -------------------------------------------------------------------------------- 1 | contract A { modifier mod(uint a) { _; } } 2 | contract B is A { modifier mod(uint8 a) { _; } } 3 | // ---- 4 | // TypeError: (61-89): Override changes modifier signature. 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/modifiers/legal_modifier_override.sol: -------------------------------------------------------------------------------- 1 | contract A { modifier mod(uint a) { _; } } 2 | contract B is A { modifier mod(uint a) { _; } } 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/modifiers/modifier_returns_value.sol: -------------------------------------------------------------------------------- 1 | contract A { 2 | function f(uint a) mod(2) public returns (uint r) { } 3 | modifier mod(uint a) { _; return 7; } 4 | } 5 | // ---- 6 | // TypeError: (101-109): Return arguments not allowed. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/modifiers/modifier_without_underscore.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | modifier m() {} 3 | } 4 | // ---- 5 | // SyntaxError: (33-35): Modifier body does not contain '_'. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/multiVariableDeclaration/multiSingleVariableDeclaration.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() internal returns (uint) { 3 | (uint a) = f(); 4 | a; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/multiVariableDeclaration/oneElementTuple.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public { 3 | (uint a,) = (1,); 4 | a; 5 | } 6 | } 7 | // ---- 8 | // TypeError: (59-63): Tuple component cannot be empty. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/004_reference_to_later_declaration.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function g() public { f(); } 3 | function f() public {} 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/015_balance_invalid.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function fun() public { 3 | address(0).balance = 7; 4 | } 5 | } 6 | // ---- 7 | // TypeError: (52-70): Expression has to be an lvalue. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/053_hash_collision_in_interface.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function gsf() public { } 3 | function tgeo() public { } 4 | } 5 | // ---- 6 | // TypeError: (0-78): Function signature hash collision for tgeo() 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/054_inheritance_basic.sol: -------------------------------------------------------------------------------- 1 | contract base { uint baseMember; struct BaseType { uint element; } } 2 | contract derived is base { 3 | BaseType data; 4 | function f() public { baseMember = 7; } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/056_cyclic_inheritance.sol: -------------------------------------------------------------------------------- 1 | contract A is B { } 2 | contract B is A { } 3 | // ---- 4 | // TypeError: (14-15): Definition of base has to precede definition of derived contract 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/057_legal_override_direct.sol: -------------------------------------------------------------------------------- 1 | contract B { function f() public {} } 2 | contract C is B { function f(uint i) public {} } 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/058_legal_override_indirect.sol: -------------------------------------------------------------------------------- 1 | contract A { function f(uint a) public {} } 2 | contract B { function f() public {} } 3 | contract C is A, B { } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/059_illegal_override_visibility.sol: -------------------------------------------------------------------------------- 1 | contract B { function f() internal {} } 2 | contract C is B { function f() public {} } 3 | // ---- 4 | // TypeError: (58-80): Overriding function visibility differs. 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/061_missing_base_constructor_arguments.sol: -------------------------------------------------------------------------------- 1 | contract A { constructor(uint a) public { } } 2 | contract B is A { } 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/062_base_constructor_arguments_override.sol: -------------------------------------------------------------------------------- 1 | contract A { constructor(uint a) public { } } 2 | contract B is A { } 3 | // ---- 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/074_fallback_function.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint x; 3 | function() external { x = 2; } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/075_fallback_function_with_arguments.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint x; 3 | function(uint a) external { x = 2; } 4 | } 5 | // ---- 6 | // TypeError: (37-45): Fallback function cannot take parameters. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/076_fallback_function_in_library.sol: -------------------------------------------------------------------------------- 1 | library C { 2 | function() external {} 3 | } 4 | // ---- 5 | // TypeError: (16-38): Libraries cannot have fallback functions. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/077_fallback_function_with_return_parameters.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function() external returns (uint) { } 3 | } 4 | // ---- 5 | // TypeError: (45-51): Fallback function cannot return values. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/079_fallback_function_inheritance.sol: -------------------------------------------------------------------------------- 1 | contract A { 2 | uint x; 3 | function() external { x = 1; } 4 | } 5 | contract C is A { 6 | function() external { x = 2; } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/080_event.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event e(uint indexed a, bytes3 indexed s, bool indexed b); 3 | function f() public { emit e(2, "abc", true); } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/081_event_too_many_indexed.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event e(uint indexed a, bytes3 indexed b, bool indexed c, uint indexed d); 3 | } 4 | // ---- 5 | // TypeError: (17-91): More than 3 indexed arguments for event. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/082_anonymous_event_four_indexed.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event e(uint indexed a, bytes3 indexed b, bool indexed c, uint indexed d) anonymous; 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/084_events_with_same_name.sol: -------------------------------------------------------------------------------- 1 | contract TestIt { 2 | event A(); 3 | event A(uint i); 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/085_events_with_same_name_unnamed_arguments.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | event A(uint); 3 | event A(uint, uint); 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/086_events_with_same_name_different_types.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | event A(uint); 3 | event A(bytes); 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/087_double_event_declaration.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | event A(uint i); 3 | event A(uint i); 4 | } 5 | // ---- 6 | // DeclarationError: (20-36): Event with same name and arguments defined twice. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/090_event_call.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event e(uint a, bytes3 indexed s, bool indexed b); 3 | function f() public { emit e(2, "abc", true); } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/094_event_inheritance.sol: -------------------------------------------------------------------------------- 1 | contract base { 2 | event e(uint a, bytes3 indexed s, bool indexed b); 3 | } 4 | contract c is base { 5 | function f() public { emit e(2, "abc", true); } 6 | } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/095_multiple_events_argument_clash.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event e1(uint a, uint e1, uint e2); 3 | event e2(uint a, uint e1, uint e2); 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/096_access_to_default_function_visibility.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | function f() public {} 3 | } 4 | contract d { 5 | function g() public { c(0).f(); } 6 | } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/104_empty_name_input_parameter.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f(uint) public { } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/106_empty_name_return_parameter.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() public returns (bool) { } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/110_no_overflow_with_large_literal.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | constructor() public { 3 | a = 115792089237316195423570985008687907853269984665640564039458; 4 | } 5 | uint256 a; 6 | } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/114_exp_warn_literal_base_2.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() pure public returns(uint) { 3 | uint8 x = 100; 4 | return uint8(10)**x; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/115_exp_warn_literal_base_3.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() pure public returns(uint) { 3 | return 2**80; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/117_shift_warn_literal_base_2.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() pure public returns(uint) { 3 | uint8 x = 100; 4 | return uint8(10) << x; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/118_shift_warn_literal_base_3.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() pure public returns(uint) { 3 | return 2 << 80; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/119_shift_warn_literal_base_4.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() pure public returns(uint) { 3 | uint8 x = 100; 4 | return 10 >> x; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/133_enum_duplicate_values.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | enum ActionChoices { GoLeft, GoRight, GoLeft, Sit } 3 | } 4 | // ---- 5 | // DeclarationError: (66-72): Identifier already declared. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/139_no_name_suggestion.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | function g() public { fun(); } 3 | } 4 | // ---- 5 | // DeclarationError: (39-42): Undeclared identifier. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/146_external_argument_assign.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | function f(uint a) external { a = 1; } 3 | } 4 | // ---- 5 | // TypeError: (47-48): Expression has to be an lvalue. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/147_external_argument_increment.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | function f(uint a) external { a++; } 3 | } 4 | // ---- 5 | // TypeError: (47-48): Expression has to be an lvalue. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/148_external_argument_delete.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | function f(uint a) external { delete a; } 3 | } 4 | // ---- 5 | // TypeError: (54-55): Expression has to be an lvalue. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/151_array_with_negative_length.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | function f(uint a) public { uint8[-1] x; } 3 | } 4 | // ---- 5 | // TypeError: (51-53): Array with negative length specified. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/154_array_copy_with_different_types_conversion_possible.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | uint32[] a; 3 | uint8[] b; 4 | function f() public { a = b; } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/155_array_copy_with_different_types_static_dynamic.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | uint32[] a; 3 | uint8[80] b; 4 | function f() public { a = b; } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/157_array_of_undeclared_type.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | a[] public foo; 3 | } 4 | // ---- 5 | // DeclarationError: (17-18): Identifier not found or not unique. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/165_assigning_state_to_const_variable.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | address constant x = msg.sender; 3 | } 4 | // ---- 5 | // TypeError: (38-48): Initial value for constant variable has to be compile-time constant. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/168_assignment_to_const_var_involving_conversion.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | C constant x = C(0x123); 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/169_assignment_to_const_var_involving_expression.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint constant x = 0x123 + 0x456; 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/170_assignment_to_const_var_involving_keccak.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | bytes32 constant x = keccak256("abc"); 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/171_assignment_to_const_array_vars.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[3] constant x = [uint(1), 2, 3]; 3 | } 4 | // ---- 5 | // TypeError: (17-53): Constants of non-value type not yet implemented. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/172_assignment_to_const_string_bytes.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | bytes constant a = "\x00\x01\x02"; 3 | bytes constant b = hex"000102"; 4 | string constant c = "hello"; 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/173_constant_struct.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | struct S { uint x; uint[] y; } 3 | S constant x = S(5, new uint[](4)); 4 | } 5 | // ---- 6 | // TypeError: (52-86): Constants of non-value type not yet implemented. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/174_address_is_constant.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | address constant x = 0x1212121212121212121212121212121212121212; 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/175_uninitialized_const_variable.sol: -------------------------------------------------------------------------------- 1 | contract Foo { 2 | uint constant y; 3 | } 4 | // ---- 5 | // TypeError: (19-34): Uninitialized "constant" variable. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/187_large_utf8_codepoint.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | string s = "\xf0\x9f\xa6\x84"; 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/188_string_index.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | string s; 3 | function f() public { bytes1 a = s[2]; } 4 | } 5 | // ---- 6 | // TypeError: (64-68): Index access for string is not possible. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/190_negative_integers_to_signed_out_of_bound.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | int8 public i = -129; 3 | } 4 | // ---- 5 | // TypeError: (36-40): Type int_const -129 is not implicitly convertible to expected type int8. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/191_negative_integers_to_signed_min.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | int8 public i = -128; 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/192_positive_integers_to_signed_out_of_bound.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | int8 public j = 128; 3 | } 4 | // ---- 5 | // TypeError: (36-39): Type int_const 128 is not implicitly convertible to expected type int8. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/193_positive_integers_to_signed_out_of_bound_max.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | int8 public j = 127; 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/194_negative_integers_to_unsigned.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint8 public x = -1; 3 | } 4 | // ---- 5 | // TypeError: (37-39): Type int_const -1 is not implicitly convertible to expected type uint8. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/196_integer_boolean_or.sol: -------------------------------------------------------------------------------- 1 | contract test { function() external { uint x = 1; uint y = 2; x || y; } } 2 | // ---- 3 | // TypeError: (62-68): Operator || not compatible with types uint256 and uint256 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/197_integer_boolean_and.sol: -------------------------------------------------------------------------------- 1 | contract test { function() external { uint x = 1; uint y = 2; x && y; } } 2 | // ---- 3 | // TypeError: (62-68): Operator && not compatible with types uint256 and uint256 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/198_integer_boolean_not.sol: -------------------------------------------------------------------------------- 1 | contract test { function() external { uint x = 1; !x; } } 2 | // ---- 3 | // TypeError: (50-52): Unary operator ! cannot be applied to type uint256 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/199_integer_unsigned_exp_signed.sol: -------------------------------------------------------------------------------- 1 | contract test { function() external { uint x = 3; int y = -4; x ** y; } } 2 | // ---- 3 | // TypeError: (62-68): Operator ** not compatible with types uint256 and int256 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/200_integer_signed_exp_unsigned.sol: -------------------------------------------------------------------------------- 1 | contract test { function() external { uint x = 3; int y = -4; y ** x; } } 2 | // ---- 3 | // TypeError: (62-68): Operator ** not compatible with types int256 and uint256 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/214_assignment_mem_storage_variable_directly.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[] data; 3 | function f(uint[] memory x) public { 4 | data = x; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/216_function_argument_storage_to_mem.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(uint[] storage x) private { 3 | g(x); 4 | } 5 | function g(uint[] memory x) public { 6 | } 7 | } 8 | // ---- 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/225_inheriting_from_library.sol: -------------------------------------------------------------------------------- 1 | library Lib {} 2 | contract Test is Lib {} 3 | // ---- 4 | // TypeError: (32-35): Libraries cannot be inherited from. 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/226_inheriting_library.sol: -------------------------------------------------------------------------------- 1 | contract Test {} 2 | library Lib is Test {} 3 | // ---- 4 | // TypeError: (17-39): Library is not allowed to inherit. 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/227_library_having_variables.sol: -------------------------------------------------------------------------------- 1 | library Lib { uint x; } 2 | // ---- 3 | // TypeError: (14-20): Library cannot have non-constant state variables 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/228_valid_library.sol: -------------------------------------------------------------------------------- 1 | library Lib { uint constant x = 9; } 2 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/245_tuples_empty_components.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public { 3 | (1,,2); 4 | } 5 | } 6 | // ---- 7 | // TypeError: (47-53): Tuple component cannot be empty. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/251_using_for_library.sol: -------------------------------------------------------------------------------- 1 | library D { } 2 | contract C { 3 | using D for uint; 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/252_using_for_not_library.sol: -------------------------------------------------------------------------------- 1 | contract D { } 2 | contract C { 3 | using D for uint; 4 | } 5 | // ---- 6 | // TypeError: (38-39): Library name expected. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/265_new_for_non_array.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(uint size) public { 3 | uint x = new uint(7); 4 | } 5 | } 6 | // ---- 7 | // TypeError: (65-73): Contract or array type expected. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/268_function_overload_array_type.sol: -------------------------------------------------------------------------------- 1 | contract M { 2 | function f(uint[] memory) public; 3 | function f(int[] memory) public; 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/290_varM_disqualified_as_keyword_2.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() public { 3 | intM should = 4; 4 | } 5 | } 6 | // ---- 7 | // DeclarationError: (50-54): Identifier not found or not unique. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/298_invalid_fixed_types_0x7_mxn.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | fixed0x7 a = .3; 3 | } 4 | // ---- 5 | // DeclarationError: (20-28): Identifier not found or not unique. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/300_invalid_fixed_types_7x8_mxn.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | fixed7x8 c = 3.12345678; 3 | } 4 | // ---- 5 | // DeclarationError: (20-28): Identifier not found or not unique. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/307_rational_unary_minus_operation.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() pure public { 3 | ufixed16x2 a = 3.25; 4 | fixed16x2 b = -3.25; 5 | a; b; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/323_mapping_with_fixed_literal.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | mapping(ufixed8x1 => string) fixedString; 3 | function f() public { 4 | fixedString[0.5] = "Half"; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/324_fixed_points_inside_structs.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | struct myStruct { 3 | ufixed a; 4 | int b; 5 | } 6 | myStruct a = myStruct(3.125, 3); 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/345_unused_return_value.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function g() public returns (uint) {} 3 | function f() public { 4 | g(); 5 | } 6 | } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/347_unused_return_value_call.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() public { 3 | address(0x12).call("abc"); 4 | } 5 | } 6 | // ---- 7 | // Warning: (50-75): Return value of low-level calls not used. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/353_callcode_not_deprecated_as_function.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function callcode() pure public { 3 | test.callcode(); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/354_payable_in_library.sol: -------------------------------------------------------------------------------- 1 | library test { 2 | function f() payable public {} 3 | } 4 | // ---- 5 | // TypeError: (19-49): Library functions cannot be payable. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/355_payable_external.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() payable external {} 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/356_payable_internal.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() payable internal {} 3 | } 4 | // ---- 5 | // TypeError: (20-52): Internal functions cannot be payable. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/357_payable_private.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() payable private {} 3 | } 4 | // ---- 5 | // TypeError: (20-51): Internal functions cannot be payable. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/366_invalid_array_as_statement.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | struct S { uint x; } 3 | constructor(uint k) public { S[k]; } 4 | } 5 | // ---- 6 | // TypeError: (76-77): Integer constant expected. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/368_shift_constant_left_negative_rvalue.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint public a = 0x42 << -8; 3 | } 4 | // ---- 5 | // TypeError: (33-43): Operator << not compatible with types int_const 66 and int_const -8 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/369_shift_constant_right_negative_rvalue.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint public a = 0x42 >> -8; 3 | } 4 | // ---- 5 | // TypeError: (33-43): Operator >> not compatible with types int_const 66 and int_const -8 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/398_does_not_warn_msg_value_in_payable_function.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() payable public { 3 | msg.value; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/399_does_not_warn_msg_value_in_internal_function.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() view internal { 3 | msg.value; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/400_does_not_warn_msg_value_in_library.sol: -------------------------------------------------------------------------------- 1 | library C { 2 | function f() view public { 3 | msg.value; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/401_does_not_warn_msg_value_in_modifier_following_non_payable_public_function.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | function f() pure public { } 3 | modifier m() { msg.value; _; } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/402_assignment_to_constant.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | uint constant a = 1; 3 | function f() public { a = 2; } 4 | } 5 | // ---- 6 | // TypeError: (64-65): Cannot assign to a constant variable. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/405_address_checksum_type_deduction.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public { 3 | (0xfA0bFc97E48458494Ccd857e1A85DC91F7F0046E).transfer(2); 4 | } 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/414_interface.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | } 3 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/415_interface_functions.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | function() external; 3 | function f() external; 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/416_interface_function_bodies.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | function f() external pure { 3 | } 4 | } 5 | // ---- 6 | // TypeError: (18-52): Functions in interfaces cannot have an implementation. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/417_interface_events.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | event E(); 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/418_interface_inheritance.sol: -------------------------------------------------------------------------------- 1 | interface A { 2 | } 3 | interface I is A { 4 | } 5 | // ---- 6 | // TypeError: (31-32): Interfaces cannot inherit. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/419_interface_structs.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | struct A { 3 | int dummy; 4 | } 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/420_interface_variables.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | uint a; 3 | } 4 | // ---- 5 | // TypeError: (18-24): Variables cannot be declared in interfaces. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/421_interface_function_parameters.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | function f(uint a) external returns (bool); 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/422_interface_enums.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | enum A { B, C } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/423_using_interface.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | function f() external; 3 | } 4 | contract C is I { 5 | function f() public { 6 | } 7 | } 8 | // ---- 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/425_interface_implement_public_contract.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | function f() external; 3 | } 4 | contract C is I { 5 | function f() public { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/429_revert_with_reason.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(uint x) pure public { 3 | if (x > 7) 4 | revert("abc"); 5 | else 6 | revert(); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/430_bare_selfdestruct.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public { selfdestruct; } 3 | } 4 | // ---- 5 | // Warning: (44-56): Statement has no effect. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/431_bare_assert.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public { assert; } 3 | } 4 | // ---- 5 | // Warning: (44-50): Statement has no effect. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/434_pure_statement_check_for_regular_for_loop.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public { 3 | for (uint x = 0; true; x++) 4 | {} 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/438_unused_unnamed_function_parameter.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(uint) pure public { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/441_unused_unnamed_return_parameter.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public returns (uint) { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/442_named_return_parameter.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public returns (uint a) { 3 | a = 1; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/443_named_return_parameter_with_explicit_return.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public returns (uint a) { 3 | return 1; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/444_unnamed_return_parameter_with_explicit_return.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public returns (uint) { 3 | return 1; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/445_no_unused_warning_interface_arguments.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | function f(uint a) pure external returns (uint b); 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/446_no_unused_warning_abstract_arguments.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(uint a) pure public returns (uint b); 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/447_no_unused_warnings.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(uint a) pure public returns (uint b) { 3 | uint c = 1; 4 | b = a + c; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/459_function_overload_is_not_shadowing.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public {} 3 | function f(uint) pure public {} 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/460_function_override_is_not_shadowing.sol: -------------------------------------------------------------------------------- 1 | contract D { function f() pure public {} } 2 | contract C is D { 3 | function f(uint) pure public {} 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/461_event_parameter_cannot_shadow_state_variable.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | address a; 3 | event E(address a); 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/470_specified_storage_no_warn.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | struct S { uint a; string b; } 3 | S x; 4 | function f() view public { 5 | S storage y = x; 6 | y; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/476_too_large_arrays_for_calldata_external.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(uint[85678901234] calldata a) pure external { 3 | } 4 | } 5 | // ---- 6 | // TypeError: (28-56): Array is too large to be encoded. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/477_too_large_arrays_for_calldata_internal.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(uint[85678901234] memory a) pure internal { 3 | } 4 | } 5 | // ---- 6 | // TypeError: (28-54): Array is too large to be encoded. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/478_too_large_arrays_for_calldata_public.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(uint[85678901234] memory a) pure public { 3 | } 4 | } 5 | // ---- 6 | // TypeError: (28-54): Array is too large to be encoded. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/479_explicit_literal_to_memory_string_assignment.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public { 3 | string memory x = "abc"; 4 | x; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/482_explicit_literal_to_unspecified_string.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public { 3 | string("abc"); 4 | } 5 | } 6 | // ---- 7 | // Warning: (52-65): Statement has no effect. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/483_modifiers_access_storage_pointer.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | struct S { uint a; } 3 | modifier m(S storage x) { 4 | x; 5 | _; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/487_function_types_selector_4.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure external returns (bytes4) { 3 | return this.f.selector; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/488_function_types_selector_5.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function h() pure external { 3 | } 4 | function f() pure external returns (bytes4) { 5 | return this.h.selector; 6 | } 7 | } 8 | // ---- 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/497_gasleft.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public view returns (uint256 val) { return gasleft(); } 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/498_msg_gas_deprecated.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public view returns (uint256 val) { return msg.gas; } 3 | } 4 | // ---- 5 | // TypeError: (73-80): "msg.gas" has been deprecated in favor of "gasleft()" 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/501_gasleft_shadowing_2.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint gasleft; 3 | function f() public { gasleft = 42; } 4 | } 5 | // ---- 6 | // Warning: (17-29): This declaration shadows a builtin symbol. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/506_large_storage_array_fine.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[2**64 - 1] x; 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/511_library_function_without_implementation_public.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | // This can be used as an "interface", hence it is allowed. 3 | function f() public; 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/512_library_function_without_implementation_internal.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | function f() internal; 3 | } 4 | // ---- 5 | // TypeError: (16-38): Internal library function must be implemented if declared. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/513_library_function_without_implementation_private.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | function f() private; 3 | } 4 | // ---- 5 | // TypeError: (16-37): Internal library function must be implemented if declared. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/515_experimental_pragma_empty.sol: -------------------------------------------------------------------------------- 1 | pragma experimental; 2 | // ---- 3 | // SyntaxError: (0-20): Experimental feature name is missing. 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/516_experimental_pragma_unknown_number_literal.sol: -------------------------------------------------------------------------------- 1 | pragma experimental 123; 2 | // ---- 3 | // SyntaxError: (0-24): Unsupported experimental feature name. 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/517_experimental_pragma_unknown_string_literal.sol: -------------------------------------------------------------------------------- 1 | pragma experimental unsupportedName; 2 | // ---- 3 | // SyntaxError: (0-36): Unsupported experimental feature name. 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/518_experimental_pragma_unknown_quoted_string_literal.sol: -------------------------------------------------------------------------------- 1 | pragma experimental "unsupportedName"; 2 | // ---- 3 | // SyntaxError: (0-38): Unsupported experimental feature name. 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/519_experimental_pragma_empy_string_literal.sol: -------------------------------------------------------------------------------- 1 | pragma experimental ""; 2 | // ---- 3 | // SyntaxError: (0-23): Empty experimental feature name is invalid. 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/520_experimental_pragma_multiple_same_line.sol: -------------------------------------------------------------------------------- 1 | pragma experimental unsupportedName unsupportedName; 2 | // ---- 3 | // SyntaxError: (0-52): Stray arguments. 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/521_experimental_pragma_test_warning.sol: -------------------------------------------------------------------------------- 1 | pragma experimental __test; 2 | // ---- 3 | // Warning: (0-27): Experimental features are turned on. Do not use experimental features on live deployments. 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/523_reject_interface_creation.sol: -------------------------------------------------------------------------------- 1 | interface I {} 2 | contract C { 3 | function f() public { 4 | new I(); 5 | } 6 | } 7 | // ---- 8 | // TypeError: (62-67): Cannot instantiate an interface. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/524_accept_library_creation.sol: -------------------------------------------------------------------------------- 1 | library L {} 2 | contract C { 3 | function f() public { 4 | new L(); 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/526_fallback_marked_external.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function () external { } 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/527_fallback_marked_internal.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function () internal { } 3 | } 4 | // ---- 5 | // TypeError: (17-41): Fallback function must be defined as "external". 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/528_fallback_marked_private.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function () private { } 3 | } 4 | // ---- 5 | // TypeError: (17-40): Fallback function must be defined as "external". 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/529_fallback_marked_public.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function () public { } 3 | } 4 | // ---- 5 | // TypeError: (17-39): Fallback function must be defined as "external". 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/533_tuple_invalid_literal_too_large_exp.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public { 3 | (2**270, 1); 4 | } 5 | } 6 | // ---- 7 | // TypeError: (53-59): Invalid rational number. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/534_tuple_invalid_literal_too_large_expression.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public { 3 | ((2**270) / 2**100, 1); 4 | } 5 | } 6 | // ---- 7 | // Warning: (52-74): Statement has no effect. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/536_array_length_invalid_expression_negative_bool.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[-true] ids; 3 | } 4 | // ---- 5 | // TypeError: (22-27): Invalid array length, expected integer literal or constant expression. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/537_array_length_invalid_expression_int_divides_bool.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[true/1] ids; 3 | } 4 | // ---- 5 | // TypeError: (22-28): Invalid array length, expected integer literal or constant expression. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/538_array_length_invalid_expression_bool_divides_int.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[1/true] ids; 3 | } 4 | // ---- 5 | // TypeError: (22-28): Invalid array length, expected integer literal or constant expression. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/540_array_length_invalid_expression_division_by_zero.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint[3/0] ids; 3 | } 4 | // ---- 5 | // TypeError: (22-25): Operator / not compatible with types int_const 3 and int_const 0 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/559_no_warning_for_using_members_that_look_like_address_members.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function transfer(uint) public; 3 | function f() public { 4 | this.transfer(10); 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/560_event_emit_simple.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | event e(); 3 | function f() public { 4 | emit e(); 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/561_event_emit_complex.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | event e(uint a, string b); 3 | function f() public { 4 | emit e(2, "abc"); 5 | emit e({b: "abc", a: 8}); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/568_blockhash.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public view returns (bytes32) { return blockhash(3); } 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/570_function_type_undeclared_type.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function a(function(Nested)) external pure {} 3 | } 4 | // ---- 5 | // DeclarationError: (37-43): Identifier not found or not unique. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/571_function_type_undeclared_type_external.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function a(function(Nested) external) external pure {} 3 | } 4 | // ---- 5 | // DeclarationError: (37-43): Identifier not found or not unique. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/584_abi_decode_with_tuple_of_other_than_types.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public { abi.decode("", (0)); } 3 | } 4 | // ---- 5 | // TypeError: (60-61): Argument has to be a type name. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/shadowsBuiltin/events.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | event keccak256(); 3 | } 4 | // ---- 5 | // Warning: (17-35): This declaration shadows a builtin symbol. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/shadowsBuiltin/functions.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function keccak256() pure public {} 3 | } 4 | // ---- 5 | // Warning: (17-52): This declaration shadows a builtin symbol. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/shadowsBuiltin/global_scope.sol: -------------------------------------------------------------------------------- 1 | contract msg { 2 | } 3 | // ---- 4 | // Warning: (0-16): This declaration shadows a builtin symbol. 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/shadowsBuiltin/ignores_constructor.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | constructor() public {} 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/shadowsBuiltin/ignores_struct.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | struct a { 3 | uint msg; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/shadowsBuiltin/parameters.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(uint require) pure public { 3 | require = 2; 4 | } 5 | } 6 | // ---- 7 | // Warning: (28-40): This declaration shadows a builtin symbol. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/shadowsBuiltin/storage_variables.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint msg; 3 | } 4 | // ---- 5 | // Warning: (17-25): This declaration shadows a builtin symbol. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/shadowsBuiltin/variables.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public { 3 | uint msg; 4 | msg; 5 | } 6 | } 7 | // ---- 8 | // Warning: (52-60): This declaration shadows a builtin symbol. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/typeChecking/function_call.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() public returns (bool) { return g(12, true) == 3; } 3 | function g(uint256, bool) public returns (uint256) { } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/typeChecking/return.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() public returns (bool r) { return 1 >= 2; } 3 | } 4 | // ---- 5 | // Warning: (20-75): Function state mutability can be restricted to pure 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/warnUnused/function_parameter.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(uint a) pure public { 3 | } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/warnUnused/local.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public { 3 | uint a; 4 | } 5 | } 6 | // ---- 7 | // Warning: (52-58): Unused local variable. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/warnUnused/local_assignment.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public { 3 | uint a = 1; 4 | } 5 | } 6 | // ---- 7 | // Warning: (52-58): Unused local variable. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/nameAndTypeResolution/warnUnused/return_parameter.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure public returns (uint a) { 3 | } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/natspec/docstring_empty_description.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | /// @param id 3 | function vote(uint id) public; 4 | } 5 | // ---- 6 | // DocstringParsingError: No description given for param id 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/natspec/docstring_empty_tag.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | /// @param 3 | function vote(uint id) public; 4 | } 5 | // ---- 6 | // DocstringParsingError: End of tag @param not found 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/address_constant_payable.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | address constant payable b = address(0); 3 | } 4 | // ---- 5 | // ParserError: (34-41): Expected identifier but got 'payable' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/address_function_arguments_and_returns.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(address) public pure returns (address) {} 3 | function g(address payable) public pure returns (address payable) {} 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/address_in_struct.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | struct S { 3 | address payable a; 4 | address b; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/address_nonpayable.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | address a; 3 | function f(address b) public pure returns (address c) { 4 | address d = b; 5 | return d; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/address_payable.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | address payable a; 3 | function f(address payable b) public pure returns (address payable c) { 4 | address payable d = b; 5 | return d; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/address_payable_constant.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | address payable constant a = address(0); 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/address_payable_conversion.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | address payable a = address payable(this); 4 | } 5 | } 6 | // ---- 7 | // ParserError: (80-87): Expected ';' but got 'payable' 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/address_payable_library.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | } 3 | contract C { 4 | using L for address payable; 5 | } -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/address_payable_type_expression.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | address payable; 4 | } 5 | } 6 | // ---- 7 | // ParserError: (67-68): Expected identifier but got ';' 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/address_public_payable_error.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | address public payable a; 3 | } 4 | // ---- 5 | // ParserError: (32-39): Expected identifier but got 'payable' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/arrays_in_events.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event e(uint[10] a, bytes7[8] indexed b, c[3] x); 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/arrays_in_storage.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | uint[10] a; 3 | uint[] a2; 4 | struct x { uint[2**20] b; y[1] c; } 5 | struct y { uint d; mapping(uint=>x)[] e; } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/assembly_evmasm_type.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | assembly "evmasm" {} 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/assembly_invalid_type.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | assembly "failasm" {} 4 | } 5 | } 6 | // ---- 7 | // ParserError: (55-64): Only "evmasm" supported. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/comment_end_with_double_star.sol: -------------------------------------------------------------------------------- 1 | contract C1 { 2 | /** 3 | **/ 4 | } 5 | contract C2 {} 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/conditional_with_assignment.sol: -------------------------------------------------------------------------------- 1 | contract A { 2 | function f() public pure { 3 | uint y = 1; 4 | uint x = 3 < 0 ? y = 3 : 6; 5 | true ? x = 3 : 4; 6 | } 7 | } 8 | // ---- 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/constant_is_keyword.sol: -------------------------------------------------------------------------------- 1 | contract Foo { 2 | uint constant = 4; 3 | } 4 | // ---- 5 | // ParserError: (30-31): Expected identifier but got '=' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/emit_without_event.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | event A(); 3 | function f() { 4 | emit A; 5 | } 6 | } 7 | // ---- 8 | // ParserError: (49-50): Expected '(' but got ';' 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/empty_comment.sol: -------------------------------------------------------------------------------- 1 | // 2 | contract test 3 | {} 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/empty_enum.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | enum foo { } 3 | } 4 | // ---- 5 | // ParserError: (25-26): enum with no members is not allowed. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/empty_function.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint256 stateVar; 3 | function functionName(bytes20 arg1, address addr) public view returns (int id) { } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/enum_from_interface.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | enum Direction { Left, Right } 3 | } 4 | 5 | contract D { 6 | function f() public pure returns (I.Direction) { 7 | return I.Direction.Left; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/enum_from_library.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | enum Direction { Left, Right } 3 | } 4 | 5 | contract D { 6 | function f() public pure returns (L.Direction) { 7 | return L.Direction.Left; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/enum_valid_declaration.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | enum validEnum { Value1, Value2, Value3, Value4 } 3 | constructor() public { 4 | a = validEnum.Value3; 5 | } 6 | validEnum a; 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/event.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event e(); 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/event_arguments.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event e(uint a, bytes32 s); 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/event_arguments_indexed.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event e(uint a, bytes32 indexed s, bool indexed b); 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/event_with_no_argument_list.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | event e; 3 | } 4 | // ---- 5 | // ParserError: (21-22): Expected '(' but got ';' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/external_function.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | function x() external {} 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/external_variable.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | uint external x; 3 | } 4 | // ---- 5 | // ParserError: (19-27): Expected identifier but got 'external' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/fallback_function.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | function() external { } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/fixed_literal_with_double_radix.sol: -------------------------------------------------------------------------------- 1 | contract A { 2 | fixed40x40 pi = 3.14.15; 3 | } 4 | // ---- 5 | // ParserError: (34-37): Expected ';' but got 'Number' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/from_is_not_keyword.sol: -------------------------------------------------------------------------------- 1 | // "from" is not a keyword although it is used as a keyword in import directives. 2 | contract from { 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/function_no_body.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function functionName(bytes32 input) public returns (bytes32 out); 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/function_normal_comments.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint256 stateVar; 3 | // We won't see this comment 4 | function functionName(bytes32 input) public returns (bytes32 out) {} 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/function_type_as_parameter.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f(function(uint) external returns (uint) g) internal returns (uint a) { 3 | return g(1); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/function_type_as_storage_variable.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function (uint, uint) internal returns (uint) f1; 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/function_type_as_storage_variable_with_assignment.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f(uint x, uint y) public returns (uint a) {} 3 | function (uint, uint) internal returns (uint) f1 = f; 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/function_type_as_storage_variable_with_modifiers.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function (uint, uint) modifier1() returns (uint) f1; 3 | } 4 | // ---- 5 | // ParserError: (66-68): Expected '{' but got identifier 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/function_type_state_variable.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function() x; 3 | function() y = x; 4 | } -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/import_complex.sol: -------------------------------------------------------------------------------- 1 | import {hello, world} from "hello"; 2 | // ---- 3 | // ParserError: (0-35): Source "hello" not found: File not supplied initially. 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/import_complex_invalid_from.sol: -------------------------------------------------------------------------------- 1 | import {hello, world} from function; 2 | // ---- 3 | // ParserError: (27-35): Expected import path. 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/import_complex_without_from.sol: -------------------------------------------------------------------------------- 1 | import {hello, world}; 2 | // ---- 3 | // ParserError: (21-22): Expected "from". 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/import_empty.sol: -------------------------------------------------------------------------------- 1 | import ""; 2 | // ---- 3 | // ParserError: (9-10): Import path cannot be empty. 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/import_invalid_token.sol: -------------------------------------------------------------------------------- 1 | import function; 2 | // ---- 3 | // ParserError: (7-15): Expected string literal (path), "*" or alias list. 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/import_simple.sol: -------------------------------------------------------------------------------- 1 | import "hello"; 2 | // ---- 3 | // ParserError: (0-15): Source "hello" not found: File not supplied initially. 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/inline_array_declaration.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | uint[] a; 3 | function f() public returns (uint, uint) { 4 | a = [1,2,3]; 5 | return (a[3], [2,3,4][0]); 6 | } 7 | } 8 | // ---- 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/interface_basic.sol: -------------------------------------------------------------------------------- 1 | interface Interface { 2 | function f() external; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/invalid_fixed_conversion_leading_zeroes_check.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() { 3 | fixed a = 1.0x2; 4 | } 5 | } 6 | // ---- 7 | // ParserError: (44-47): Identifier-start is not allowed at end of a number. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/lexer_numbers_with_underscores_fixed.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | fixed f1 = 3.14_15; 4 | fixed f2 = 3_1.4_15; 5 | 6 | f1; f2; 7 | } 8 | } 9 | // ---- 10 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/library_simple.sol: -------------------------------------------------------------------------------- 1 | library Lib { 2 | function f() public { } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/literal_constants_with_ether_subdenominations_in_expressions.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | constructor() public 3 | { 4 | a = 1 wei * 100 wei + 7 szabo - 3; 5 | } 6 | uint256 a; 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/location_specifiers_for_locals.sol: -------------------------------------------------------------------------------- 1 | contract Foo { 2 | uint[] m_x; 3 | function f() public view { 4 | uint[] storage x = m_x; 5 | uint[] memory y; 6 | x; y; 7 | } 8 | } 9 | // ---- 10 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/location_specifiers_for_state_variables.sol: -------------------------------------------------------------------------------- 1 | contract Foo { 2 | uint[] memory x; 3 | } 4 | // ---- 5 | // ParserError: (23-29): Expected identifier but got 'memory' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/location_specifiers_for_state_variables_multi.sol: -------------------------------------------------------------------------------- 1 | contract Foo { 2 | uint[] memory storage calldata x; 3 | } 4 | // ---- 5 | // ParserError: (23-29): Expected identifier but got 'memory' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/location_specifiers_with_var.sol: -------------------------------------------------------------------------------- 1 | contract Foo { 2 | function f() { var memory x; } 3 | } 4 | // ---- 5 | // ParserError: (35-41): Location specifier needs explicit type name. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/malformed_enum_declaration.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | enum foo { WARNING,} 3 | } 4 | // ---- 5 | // ParserError: (33-34): Expected identifier after ',' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/mapping.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | mapping(address => bytes32) names; 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/mapping_from_address_payable.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | mapping(address payable => uint) m; 3 | } 4 | // ---- 5 | // ParserError: (33-40): Expected '=>' but got 'payable' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/mapping_in_struct.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | struct test_struct { 3 | address addr; 4 | uint256 count; 5 | mapping(bytes32 => test_struct) self_reference; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/mapping_nonelementary_key_1.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | mapping(uint[] => uint) data; 3 | } 4 | // ---- 5 | // ParserError: (26-27): Expected '=>' but got '[' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/mapping_nonelementary_key_2.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | struct S { 3 | uint x; 4 | } 5 | mapping(S => uint) data; 6 | } 7 | // ---- 8 | // ParserError: (47-48): Expected elementary type name for mapping key type 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/mapping_nonelementary_key_3.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | struct S { 3 | string s; 4 | } 5 | mapping(S => uint) data; 6 | } 7 | // ---- 8 | // ParserError: (49-50): Expected elementary type name for mapping key type 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/mapping_nonelementary_key_4.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | mapping(string[] => uint) data; 3 | } 4 | // ---- 5 | // ParserError: (28-29): Expected '=>' but got '[' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/mapping_to_mapping_in_struct.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | struct test_struct { 3 | address addr; 4 | mapping (uint64 => mapping (bytes32 => uint)) complex_mapping; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/missing_variable_name_in_declaration.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint256 ; 3 | } 4 | // ---- 5 | // ParserError: (28-29): Expected identifier but got ';' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/modifier.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | modifier mod { if (msg.sender == 0x0000000000000000000000000000000000000000) _; } 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/modifier_arguments.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | modifier mod(address a) { if (msg.sender == a) _; } 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/modifier_invocation.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | modifier mod1(uint a) { if (msg.sender == address(a)) _; } 3 | modifier mod2 { if (msg.sender == address(2)) _; } 4 | function f() public mod1(7) mod2 { } 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/modifier_without_semicolon.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | modifier mod { if (msg.sender == 0) _ } 3 | } 4 | // ---- 5 | // ParserError: (52-53): Expected ';' but got '}' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/multi_arrays.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | mapping(uint => mapping(uint => int8)[8][][9])[] x; 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/multiple_event_arg_trailing_comma.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | event Test(uint a, uint b,); 3 | function(uint a) {} 4 | } 5 | // ---- 6 | // ParserError: (45-46): Unexpected trailing comma in parameter list. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/multiple_function_param_trailing_comma.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function(uint a, uint b,) {} 3 | } 4 | // ---- 5 | // ParserError: (40-41): Unexpected trailing comma in parameter list. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/multiple_modifier_arg_trailing_comma.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | modifier modTest(uint a, uint b,) { _; } 3 | function(uint a) {} 4 | } 5 | // ---- 6 | // ParserError: (51-52): Unexpected trailing comma in parameter list. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/multiple_return_param_trailing_comma.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function() returns (uint a, uint b,) {} 3 | } 4 | // ---- 5 | // ParserError: (54-55): Unexpected trailing comma in parameter list. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/new_address_payable.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure returns(address payable[] memory m) { 3 | m = new address payable[](10); 4 | } 5 | } -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/new_invalid_type_name.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() { 3 | new var; 4 | } 5 | } 6 | // ---- 7 | // ParserError: (35-38): Expected explicit type name. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/no_function_params.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint256 stateVar; 3 | function functionName() public {} 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/payable_accessor.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint payable x; 3 | } 4 | // ---- 5 | // ParserError: (22-29): State mutability can only be specified for address types. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/scientific_notation.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint256 a = 2e10; 3 | uint256 b = 2E10; 4 | uint256 c = 200e-2; 5 | uint256 d = 2E10 wei; 6 | uint256 e = 2.5e10; 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/single_event_arg_trailing_comma.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | event Test(uint a,); 3 | function(uint a) {} 4 | } 5 | // ---- 6 | // ParserError: (34-35): Unexpected trailing comma in parameter list. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/single_function_param.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint256 stateVar; 3 | function functionName(bytes32 input) public returns (bytes32 out) {} 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/single_function_param_trailing_comma.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function(uint a,) {} 3 | } 4 | // ---- 5 | // ParserError: (32-33): Unexpected trailing comma in parameter list. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/single_modifier_arg_trailing_comma.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | modifier modTest(uint a,) { _; } 3 | function(uint a) {} 4 | } 5 | // ---- 6 | // ParserError: (40-41): Unexpected trailing comma in parameter list. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/single_return_param_trailing_comma.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function() returns (uint a,) {} 3 | } 4 | // ---- 5 | // ParserError: (43-44): Unexpected trailing comma in parameter list. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/smoke_test.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint256 stateVariable1; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/struct_definition.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint256 stateVar; 3 | struct MyStructName { 4 | address addr; 5 | uint256 count; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/trailing_dot2.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint256 a = 2.2e10; 3 | uint256 b = .5E10; 4 | uint256 c = 2 + 2.; 5 | } 6 | // ---- 7 | // ParserError: (76-77): Expected identifier but got ';' 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/trailing_dot3.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint a = 2. 3 | // ---- 4 | // ParserError: (29-29): Expected identifier but got end of source 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/tuples_decl_without_rhs.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | (uint a, uint b, uint c); 4 | } 5 | } 6 | // ---- 7 | // ParserError: (76-77): Expected '=' but got ';' 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/tuples_without_commas.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() { 3 | var a = (2 2); 4 | } 5 | } 6 | // ---- 7 | // ParserError: (42-43): Expected ',' but got 'Number' 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/var_array.sol: -------------------------------------------------------------------------------- 1 | contract Foo { 2 | function f() { var[] a; } 3 | } 4 | // ---- 5 | // ParserError: (34-35): Expected identifier but got '[' 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/var_storage_var.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | var a; 3 | } 4 | // ---- 5 | // ParserError: (17-20): Function, variable, struct or modifier declaration expected. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/variable_definition_in_mapping.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function fun() { 3 | mapping(var=>bytes32) d; 4 | } 5 | } 6 | // ---- 7 | // ParserError: (44-47): Expected elementary type name for mapping key type 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/parsing/while_loop.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function fun() public pure { 3 | uint256 x; 4 | while (true) { x = 1; break; continue; } x = 9; 5 | } 6 | } 7 | // ---- 8 | // Warning: (105-113): Unreachable code. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/pragma/invalid_pragma.sol: -------------------------------------------------------------------------------- 1 | pragma 0; 2 | // ---- 3 | // SyntaxError: (0-9): Invalid pragma "0" 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/pragma/unknown_pragma.sol: -------------------------------------------------------------------------------- 1 | pragma thisdoesntexist; 2 | // ---- 3 | // SyntaxError: (0-23): Unknown pragma "thisdoesntexist" 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/scoping/double_function_declaration.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function fun() public { } 3 | function fun() public { } 4 | } 5 | // ---- 6 | // DeclarationError: (20-45): Function with same name and arguments defined twice. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/scoping/double_variable_declaration_same_scope.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() pure public { 3 | uint x; 4 | uint x; 5 | } 6 | } 7 | // ---- 8 | // DeclarationError: (71-77): Identifier already declared. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/scoping/function_state_variable_conflict.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(uint) public pure {} 3 | uint public f = 0; 4 | } 5 | // ---- 6 | // DeclarationError: (53-70): Identifier already declared. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/scoping/name_shadowing.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint256 variable; 3 | function f() pure public { uint32 variable; variable = 2; } 4 | } 5 | // ---- 6 | // Warning: (69-84): This declaration shadows an existing declaration. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/scoping/scoping.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() public { 3 | { 4 | uint256 x; 5 | } 6 | x = 2; 7 | } 8 | } 9 | // ---- 10 | // DeclarationError: (93-94): Undeclared identifier. 11 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/scoping/scoping_for.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() pure public { 3 | for (uint x = 0; x < 10; x ++){ 4 | x = 2; 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/scoping/scoping_for2.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() pure public { 3 | for (uint x = 0; x < 10; x ++) 4 | x = 2; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/scoping/scoping_self_use.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() pure public { 3 | uint a = a; 4 | } 5 | } 6 | // ---- 7 | // DeclarationError: (64-65): Undeclared identifier. "a" is not (or not yet) visible at this point. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/scoping/state_variable_function_conflict.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint public f = 0; 3 | function f(uint) public pure {} 4 | } 5 | // ---- 6 | // DeclarationError: (40-71): Identifier already declared. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/signed_rational_modulus.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() public pure { 3 | fixed a = 0.42578125 % -0.4271087646484375; 4 | fixed b = .5 % a; 5 | fixed c = a % b; 6 | a; b; c; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/smoke_test.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | uint256 stateVariable1; 3 | function fun(uint256 arg1) public { uint256 y; y = arg1; } 4 | } 5 | // ---- 6 | // Warning: (42-100): Function state mutability can be restricted to pure 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_empty.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | abi.decode("abc", ()); 4 | } 5 | } 6 | // ---- 7 | // Warning: (52-73): Statement has no effect. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_simple.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure returns (uint, bytes32, C) { 3 | return abi.decode("abc", (uint, bytes32, C)); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_single_return.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure returns (bool) { 3 | return abi.decode("abc", (uint)) == 2; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_singletontuple.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure returns (uint) { 3 | return abi.decode("abc", (uint)); 4 | } 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/string/string_escapes.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() public pure returns (bytes32) { 3 | bytes32 escapeCharacters = "\t\b\n\r\f\'\"\\\b"; 4 | return escapeCharacters; 5 | } 6 | } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/string/string_unterminated_no_new_line.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() pure public { "abc\ 3 | // ---- 4 | // ParserError: (47-53): Expected string end-quote. 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/structs/recursion/struct_definition_directly_recursive_dynamic_array.sol: -------------------------------------------------------------------------------- 1 | contract Test { 2 | struct MyStructName { 3 | address addr; 4 | MyStructName[] x; 5 | } 6 | } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/structs/recursion/struct_definition_not_really_recursive.sol: -------------------------------------------------------------------------------- 1 | contract Test { 2 | struct S1 { uint a; } 3 | struct S2 { S1 x; S1 y; } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/structs/recursion/struct_definition_not_really_recursive_array.sol: -------------------------------------------------------------------------------- 1 | contract Test { 2 | struct S1 { uint a; } 3 | struct S2 { S1[1] x; S1[1] y; } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/structs/recursion/struct_definition_recursion_via_mapping.sol: -------------------------------------------------------------------------------- 1 | contract Test { 2 | struct MyStructName1 { 3 | address addr; 4 | uint256 count; 5 | mapping(uint => MyStructName1) x; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/tupleAssignments/nowarn_swap_memory.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | struct S { uint a; uint b; } 3 | function f() pure public { 4 | S memory x; 5 | S memory y; 6 | (x, y) = (y, x); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/address/address_abi_decode.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(bytes memory b) public pure returns (address payable) { 3 | (address payable c) = abi.decode(b, (address)); 4 | return c; 5 | } 6 | } -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/address/address_payable_selfdestruct.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(address payable a) public { 3 | selfdestruct(a); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/address/address_to_contract.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure returns (C c) { 3 | c = C(address(2)); 4 | } 5 | } 6 | // ---- 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/address/address_to_contract_payable_fallback.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure returns (C c) { 3 | c = C(address(2)); 4 | } 5 | function() external payable { 6 | } 7 | } 8 | // ---- 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/address/address_tuple_fine.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public view returns (address payable a, address b) { 3 | (address c, address payable d) = (address(this), address(0)); 4 | (a,b) = (d,c); 5 | } 6 | } -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/address/bytes_to_payable_address.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(bytes20 x) public pure returns (address payable) { 3 | return address(x); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/address/contract_to_address.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public view { 3 | address a = address(this); 4 | a; 5 | } 6 | } 7 | // ---- 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/address/payable_address_to_address.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(address payable a) public pure { 3 | address payable b; 4 | address c = a; 5 | c = b; 6 | } 7 | } -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/address/uint_to_payable_address.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(uint x) public pure returns (address payable) { 3 | return address(x); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/bytes0.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | bytes0 b0 = 1; 3 | } 4 | // ---- 5 | // DeclarationError: (15-21): Identifier not found or not unique. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/bytes256.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | bytes256 b256 = 1; 3 | } 4 | // ---- 5 | // DeclarationError: (15-23): Identifier not found or not unique. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/bytes33.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | bytes33 b33 = 1; 3 | } 4 | // ---- 5 | // DeclarationError: (15-22): Identifier not found or not unique. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/contract_to_base.sol: -------------------------------------------------------------------------------- 1 | contract A {} 2 | contract B is A {} 3 | contract C { 4 | function f() public { 5 | A a = new B(); 6 | a; 7 | } 8 | } 9 | // ---- 10 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/contract_to_base_base.sol: -------------------------------------------------------------------------------- 1 | contract A {} 2 | contract B is A {} 3 | contract C is B {} 4 | contract D { 5 | function f() public { 6 | A a = new C(); 7 | a; 8 | } 9 | } 10 | // ---- 11 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/empty_tuple_event.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | event SomeEvent(); 3 | function a() public { 4 | (emit SomeEvent(), 7); 5 | } 6 | } 7 | // ---- 8 | // ParserError: (71-75): Expected primary expression. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/encoding_fractional.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f1() public pure returns (bytes memory) { 3 | return abi.encode(0.1, 1); 4 | } 5 | } 6 | // ---- 7 | // TypeError: (92-95): Fractional numbers cannot yet be encoded. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/function_call_fail2.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(uint y) public pure returns (uint) { 3 | (f(y)) = 2; 4 | } 5 | } 6 | // ---- 7 | // TypeError: (74-78): Expression has to be an lvalue. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/index_access_for_bytes.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | bytes20 x; 3 | function f(bytes16 b) public view { 4 | b[uint8(x[2])]; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/access_index_omitted.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | mapping(uint => uint) m; 3 | function f() public { 4 | m[] = 3; 5 | } 6 | } 7 | // ---- 8 | // TypeError: (76-79): Index expression cannot be omitted. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/argument_internal.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(mapping(uint => uint) storage) internal pure { 3 | } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/argument_private.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(mapping(uint => uint) storage) private pure { 3 | } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/array_argument_internal.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(mapping(uint => uint)[] storage) internal pure { 3 | } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/array_argument_private.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(mapping(uint => uint)[] storage) private pure { 3 | } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/function_type_argument_internal.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(function(mapping(uint=>uint) storage) internal) internal pure { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/function_type_return_internal.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f(function() internal returns (mapping(uint=>uint) storage)) internal pure { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/library_argument_external.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | function f(mapping(uint => uint) storage) external pure { 3 | } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/library_argument_internal.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | function f(mapping(uint => uint) storage) internal pure { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/library_argument_private.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | function f(mapping(uint => uint) storage) private pure { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/library_argument_public.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | function f(mapping(uint => uint) storage) public pure { 3 | } 4 | } 5 | // ---- 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/library_array_argument_external.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | function f(mapping(uint => uint)[] storage) external pure { 3 | } 4 | } 5 | // ---- 6 | // TypeError: (27-58): Type is required to live outside storage. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/library_array_argument_internal.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | function f(mapping(uint => uint)[] storage) internal pure { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/library_array_argument_private.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | function f(mapping(uint => uint)[] storage) private pure { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/library_array_argument_public.sol: -------------------------------------------------------------------------------- 1 | library L { 2 | function f(mapping(uint => uint)[] storage) public pure { 3 | } 4 | } 5 | // ---- 6 | // TypeError: (27-58): Type is required to live outside storage. 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/mapping_dynamic_key.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | mapping(string => uint) data; 3 | } 4 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/mapping/mapping_dynamic_key_public.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | mapping(string => uint) public data; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/no_singleton_tuple.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | uint a; 4 | (a,) = (uint(1),); 5 | } 6 | } 7 | // ---- 8 | // TypeError: (60-70): Tuple component cannot be empty. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/rational_negative_numerator_negative_exp.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure returns (int) { 3 | return (-1 / 2) ** -1; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/var_empty_decl_1.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | var a; 4 | a.NeverReachedByParser(); 5 | } 6 | } 7 | // ---- 8 | // TypeError: (52-57): Use of the "var" keyword is disallowed. 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/types/var_empty_decl_3.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() public pure { 3 | var (d, e,); 4 | } 5 | } 6 | // ---- 7 | // TypeError: (52-63): Use of the "var" keyword is disallowed. 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/unterminatedBlocks/one_dot.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | function f() pure public { 1. 3 | // ---- 4 | // ParserError: (47-47): Expected identifier but got end of source -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/unterminatedBlocks/one_dot_x.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() pure public { 1.x; } 3 | } 4 | // ---- 5 | // TypeError: (47-50): Member "x" not found or not visible after argument-dependent lookup in int_const 1. -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/unterminatedBlocks/zero_dot.sol: -------------------------------------------------------------------------------- 1 | contract c { 2 | function f() pure public { 0. 3 | // ---- 4 | // ParserError: (47-47): Expected identifier but got end of source -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/unterminatedBlocks/zero_dot_x.sol: -------------------------------------------------------------------------------- 1 | contract test { 2 | function f() pure public { 0.x; } 3 | } 4 | // ---- 5 | // TypeError: (47-50): Member "x" not found or not visible after argument-dependent lookup in int_const 0. -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/viewPureChecker/callvalue_payable_assembly_fallback.sol: -------------------------------------------------------------------------------- 1 | contract C 2 | { 3 | function () external payable { 4 | uint x; 5 | assembly { 6 | x := callvalue() 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/viewPureChecker/callvalue_payable_assembly_function.sol: -------------------------------------------------------------------------------- 1 | contract C 2 | { 3 | function f(uint x) public payable { 4 | assembly { 5 | x := callvalue() 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/viewPureChecker/constant.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint constant x = 2; 3 | function k() pure public returns (uint) { 4 | return x; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/viewPureChecker/creation_no_restrict_warning.sol: -------------------------------------------------------------------------------- 1 | contract D {} 2 | contract C { 3 | function f() public { new D(); } 4 | } 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/viewPureChecker/interface.sol: -------------------------------------------------------------------------------- 1 | interface D { 2 | function f() view external; 3 | } 4 | contract C is D { 5 | function f() view external {} 6 | } 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/viewPureChecker/overriding_no_restrict_warning.sol: -------------------------------------------------------------------------------- 1 | contract D { 2 | uint x; 3 | function f() public { x = 2; } 4 | } 5 | contract C is D { 6 | function f() public {} 7 | } 8 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/viewPureChecker/suggest_pure.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function g() view public { } 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/viewPureChecker/suggest_view.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | uint x; 3 | function g() public returns (uint) { return x; } 4 | } 5 | // ---- 6 | // Warning: (29-77): Function state mutability can be restricted to view 7 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/visibility/function_no_visibility.sol: -------------------------------------------------------------------------------- 1 | contract C { 2 | function f() pure { } 3 | } 4 | // ---- 5 | // SyntaxError: (17-38): No visibility specified. Did you intend to add "public"? 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/visibility/interface/function_external.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | function f() external; 3 | } 4 | // ---- 5 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/visibility/interface/function_internal.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | function f() internal; 3 | } 4 | // ---- 5 | // TypeError: (15-37): Functions in interfaces must be declared external. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/visibility/interface/function_private.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | function f() private; 3 | } 4 | // ---- 5 | // TypeError: (15-36): Functions in interfaces must be declared external. 6 | -------------------------------------------------------------------------------- /test/libsolidity/syntaxTests/visibility/interface/function_public.sol: -------------------------------------------------------------------------------- 1 | interface I { 2 | function f() public; 3 | } 4 | // ---- 5 | // TypeError: (15-35): Functions in interfaces must be declared external. 6 | -------------------------------------------------------------------------------- /test/libyul/objectCompiler/namedObject.yul: -------------------------------------------------------------------------------- 1 | object "a" { 2 | code {} 3 | } 4 | // ---- 5 | // Assembly: 6 | // -- empty bytecode -- 7 | -------------------------------------------------------------------------------- /test/libyul/objectCompiler/smoke.yul: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | // ---- 4 | // Assembly: 5 | // -- empty bytecode -- 6 | -------------------------------------------------------------------------------- /test/libyul/yulInterpreterTests/smoke.yul: -------------------------------------------------------------------------------- 1 | {} 2 | // ---- 3 | // Trace: 4 | // Memory dump: 5 | // Storage dump: 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/commonSubexpressionEliminator/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ==== 3 | // step: commonSubexpressionEliminator 4 | // ---- 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/controlFlowSimplifier/empty_if_movable_condition.yul: -------------------------------------------------------------------------------- 1 | { let a := mload(0) if a {} } 2 | // ==== 3 | // step: controlFlowSimplifier 4 | // ---- 5 | // { 6 | // let a := mload(0) 7 | // pop(a) 8 | // } 9 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/controlFlowSimplifier/empty_if_non_movable_condition.yul: -------------------------------------------------------------------------------- 1 | { if mload(0) {} } 2 | // ==== 3 | // step: controlFlowSimplifier 4 | // ---- 5 | // { pop(mload(0)) } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/disambiguator/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ==== 3 | // step: disambiguator 4 | // ---- 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/disambiguator/smoke_yul.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ==== 3 | // step: disambiguator 4 | // yul: true 5 | // ---- 6 | // { } 7 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/disambiguator/variables.yul: -------------------------------------------------------------------------------- 1 | { { let a:u256 } { let a:u256 } } 2 | // ==== 3 | // step: disambiguator 4 | // yul: true 5 | // ---- 6 | // { 7 | // { let a:u256 } 8 | // { let a_1:u256 } 9 | // } 10 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/expressionJoiner/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ==== 3 | // step: expressionJoiner 4 | // ---- 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/expressionSimplifier/constant_propagation.yul: -------------------------------------------------------------------------------- 1 | { let a := add(7, sub(mload(0), 7)) } 2 | // ==== 3 | // step: expressionSimplifier 4 | // ---- 5 | // { let a := mload(0) } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/expressionSimplifier/constants.yul: -------------------------------------------------------------------------------- 1 | { let a := add(1, mul(3, 4)) } 2 | // ==== 3 | // step: expressionSimplifier 4 | // ---- 5 | // { let a := 13 } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/expressionSimplifier/identity_rules_complex.yul: -------------------------------------------------------------------------------- 1 | { let a := sub(calldataload(0), calldataload(0)) } 2 | // ==== 3 | // step: expressionSimplifier 4 | // ---- 5 | // { let a := 0 } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/expressionSimplifier/identity_rules_negative.yul: -------------------------------------------------------------------------------- 1 | { let a := sub(calldataload(1), calldataload(0)) } 2 | // ==== 3 | // step: expressionSimplifier 4 | // ---- 5 | // { 6 | // let a := sub(calldataload(1), calldataload(0)) 7 | // } 8 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/expressionSimplifier/mod_and_1.yul: -------------------------------------------------------------------------------- 1 | { 2 | mstore(0, mod(calldataload(0), exp(2, 8))) 3 | } 4 | // ==== 5 | // step: expressionSimplifier 6 | // ---- 7 | // { 8 | // mstore(0, and(calldataload(0), 255)) 9 | // } 10 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/expressionSimplifier/reversed.yul: -------------------------------------------------------------------------------- 1 | { 2 | let a := add(0, mload(0)) 3 | } 4 | // ==== 5 | // step: expressionSimplifier 6 | // ---- 7 | // { let a := mload(0) } 8 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/expressionSimplifier/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ==== 3 | // step: expressionSimplifier 4 | // ---- 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/expressionSplitter/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ==== 3 | // step: expressionSplitter 4 | // ---- 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/fullSimplify/constants.yul: -------------------------------------------------------------------------------- 1 | { 2 | let a := add(1, mul(3, 4)) 3 | mstore(0, a) 4 | } 5 | // ==== 6 | // step: fullSimplify 7 | // ---- 8 | // { mstore(0, 13) } 9 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/fullSimplify/identity_rules_complex.yul: -------------------------------------------------------------------------------- 1 | { 2 | let a := sub(calldataload(0), calldataload(0)) 3 | mstore(a, 0) 4 | } 5 | // ==== 6 | // step: fullSimplify 7 | // ---- 8 | // { mstore(0, 0) } 9 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/fullSimplify/identity_rules_simple.yul: -------------------------------------------------------------------------------- 1 | { 2 | let a := mload(0) 3 | mstore(0, sub(a, a)) 4 | } 5 | // ==== 6 | // step: fullSimplify 7 | // ---- 8 | // { mstore(0, 0) } 9 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/fullSimplify/reversed.yul: -------------------------------------------------------------------------------- 1 | { 2 | let a := add(0, mload(0)) 3 | mstore(0, a) 4 | } 5 | // ==== 6 | // step: fullSimplify 7 | // ---- 8 | // { 9 | // let _1 := 0 10 | // mstore(_1, mload(_1)) 11 | // } 12 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/fullSimplify/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ==== 3 | // step: fullSimplify 4 | // ---- 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/functionGrouper/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ==== 3 | // step: functionGrouper 4 | // ---- 5 | // { { } } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/functionHoister/smoke.yul: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | // ==== 4 | // step: functionHoister 5 | // ---- 6 | // { } 7 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/mainFunction/smoke.yul: -------------------------------------------------------------------------------- 1 | {} 2 | // ==== 3 | // step: mainFunction 4 | // yul: true 5 | // ---- 6 | // { 7 | // function main() 8 | // { } 9 | // } 10 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/redundantAssignEliminator/simple.yul: -------------------------------------------------------------------------------- 1 | { 2 | let a 3 | a := 1 4 | a := 2 5 | } 6 | // ==== 7 | // step: redundantAssignEliminator 8 | // ---- 9 | // { let a } 10 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/rematerialiser/smoke.yul: -------------------------------------------------------------------------------- 1 | {} 2 | // ==== 3 | // step: rematerialiser 4 | // ---- 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/splitJoin/smoke.yul: -------------------------------------------------------------------------------- 1 | {} 2 | // ==== 3 | // step: splitJoin 4 | // ---- 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/ssaAndBack/simple.yul: -------------------------------------------------------------------------------- 1 | { 2 | let a := mload(0) 3 | a := mload(1) 4 | mstore(a, 0) 5 | } 6 | // ==== 7 | // step: ssaAndBack 8 | // ---- 9 | // { 10 | // let a_2 := mload(1) 11 | // mstore(a_2, 0) 12 | // } 13 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/structuralSimplifier/for_false_condition.sol: -------------------------------------------------------------------------------- 1 | { 2 | for { let a := 42 } 0 { a := a } { 3 | let b := a 4 | } 5 | } 6 | // ==== 7 | // step: structuralSimplifier 8 | // ---- 9 | // { let a := 42 } 10 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/structuralSimplifier/if_false_condition.yul: -------------------------------------------------------------------------------- 1 | { if 0 { mstore(0, 0) } } 2 | // ==== 3 | // step: structuralSimplifier 4 | // ---- 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/structuralSimplifier/if_multi_unassigned_condition.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x, y 3 | if x { mstore(0, 0) } 4 | if y { mstore(0, 0) } 5 | } 6 | // ==== 7 | // step: structuralSimplifier 8 | // ---- 9 | // { let x, y } 10 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/structuralSimplifier/if_true_condition.yul: -------------------------------------------------------------------------------- 1 | { if 1 { mstore(0, 0) } } 2 | // ==== 3 | // step: structuralSimplifier 4 | // ---- 5 | // { mstore(0, 0) } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/structuralSimplifier/if_unassigned_condition.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x 3 | if x { mstore(0, 0) } 4 | } 5 | // ==== 6 | // step: structuralSimplifier 7 | // ---- 8 | // { let x } 9 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/structuralSimplifier/nested.yul: -------------------------------------------------------------------------------- 1 | { if 1 { if 1 { for { mstore(0, 0) } 0 {} { mstore(2, 3) } if 0 { mstore(1, 2) } } } } 2 | // ==== 3 | // step: structuralSimplifier 4 | // ---- 5 | // { mstore(0, 0) } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/structuralSimplifier/switch_inline_no_match.yul: -------------------------------------------------------------------------------- 1 | { 2 | let y := 200 3 | switch 3 4 | case 0 { y := 8 } 5 | case 1 { y := 9 } 6 | } 7 | // ==== 8 | // step: structuralSimplifier 9 | // ---- 10 | // { let y := 200 } 11 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/unusedPruner/functions.yul: -------------------------------------------------------------------------------- 1 | { 2 | function f() { let a := 1 } 3 | function g() { f() } 4 | } 5 | // ==== 6 | // step: unusedPruner 7 | // ---- 8 | // { } 9 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/unusedPruner/intermediate_assignment.yul: -------------------------------------------------------------------------------- 1 | { 2 | let a := 1 3 | a := 4 4 | let b := 1 5 | } 6 | // ==== 7 | // step: unusedPruner 8 | // ---- 9 | // { 10 | // let a := 1 11 | // a := 4 12 | // } 13 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/unusedPruner/multi_assignments.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x, y 3 | x := 1 4 | y := 2 5 | } 6 | // ==== 7 | // step: unusedPruner 8 | // ---- 9 | // { 10 | // let x, y 11 | // x := 1 12 | // y := 2 13 | // } 14 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/unusedPruner/multi_declarations.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x, y 3 | } 4 | // ==== 5 | // step: unusedPruner 6 | // ---- 7 | // { } 8 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/unusedPruner/multi_partial_assignments.yul: -------------------------------------------------------------------------------- 1 | { 2 | let x, y 3 | x := 1 4 | } 5 | // ==== 6 | // step: unusedPruner 7 | // ---- 8 | // { 9 | // let x, y 10 | // x := 1 11 | // } 12 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/unusedPruner/pop.yul: -------------------------------------------------------------------------------- 1 | { 2 | let a := 1 3 | pop(a) 4 | } 5 | // ==== 6 | // step: unusedPruner 7 | // ---- 8 | // { } 9 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/unusedPruner/smoke.yul: -------------------------------------------------------------------------------- 1 | { } 2 | // ==== 3 | // step: unusedPruner 4 | // ---- 5 | // { } 6 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/unusedPruner/trivial.yul: -------------------------------------------------------------------------------- 1 | { 2 | let a := 1 3 | let b := 1 4 | mstore(0, 1) 5 | } 6 | // ==== 7 | // step: unusedPruner 8 | // ---- 9 | // { mstore(0, 1) } 10 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/varDeclInitializer/simple.yul: -------------------------------------------------------------------------------- 1 | { 2 | let a 3 | } 4 | // ==== 5 | // step: varDeclInitializer 6 | // ---- 7 | // { let a := 0 } 8 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/varNameCleaner/builtins.yul: -------------------------------------------------------------------------------- 1 | { 2 | let datasize_256 := 1 3 | } 4 | // ==== 5 | // step: varNameCleaner 6 | // ---- 7 | // { let datasize_1 := 1 } 8 | -------------------------------------------------------------------------------- /test/libyul/yulOptimizerTests/varNameCleaner/instructions.yul: -------------------------------------------------------------------------------- 1 | { 2 | let mul_256 := 1 3 | } 4 | // ==== 5 | // step: varNameCleaner 6 | // ---- 7 | // { let mul_1 := 1 } 8 | -------------------------------------------------------------------------------- /test/regression/.gitignore: -------------------------------------------------------------------------------- 1 | Output/ 2 | -------------------------------------------------------------------------------- /test/tools/ossfuzz/config/solc_noopt_ossfuzz.options: -------------------------------------------------------------------------------- 1 | [libfuzzer] 2 | dict = solidity.dict 3 | -------------------------------------------------------------------------------- /test/tools/ossfuzz/config/solc_opt_ossfuzz.options: -------------------------------------------------------------------------------- 1 | [libfuzzer] 2 | dict = solidity.dict 3 | -------------------------------------------------------------------------------- /test/tools/ossfuzz/config/strictasm_assembly_ossfuzz.options: -------------------------------------------------------------------------------- 1 | [libfuzzer] 2 | dict = strict_assembly.dict 3 | -------------------------------------------------------------------------------- /test/tools/ossfuzz/config/strictasm_opt_ossfuzz.options: -------------------------------------------------------------------------------- 1 | [libfuzzer] 2 | dict = strict_assembly.dict 3 | -------------------------------------------------------------------------------- /tutorials/.gitignore: -------------------------------------------------------------------------------- 1 | *.aux 2 | *.fdb_latexmk 3 | *.fls 4 | *.log 5 | *.pdf 6 | *.synctex.gz 7 | -------------------------------------------------------------------------------- /tutorials/3_monitor.gv: -------------------------------------------------------------------------------- 1 | digraph finite_state_machine { 2 | rankdir=LR; 3 | node [shape = doublecircle]; q1 q2; 4 | q1 -> q1 [ label = "unchanged && !called" ]; 5 | q1 -> q2 [ label = "called" ]; 6 | q2 -> q2 [ label = "True" ]; 7 | } 8 | 9 | --------------------------------------------------------------------------------