diff options
author | chriseth <chris@ethereum.org> | 2017-08-26 01:38:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-26 01:38:15 +0800 |
commit | 372279ceb29b032cb977eeeb5df4c9495aebd206 (patch) | |
tree | 7933738c7a55f64c2f600364ce4f7ba0892f1bc5 /test | |
parent | 9e90ddcae5dd7fb6eb70e49f978979979cf39985 (diff) | |
parent | 8bc76ecf58b3e57ccfbc69da5e9633bae490ca92 (diff) | |
download | dexon-solidity-372279ceb29b032cb977eeeb5df4c9495aebd206.tar.gz dexon-solidity-372279ceb29b032cb977eeeb5df4c9495aebd206.tar.zst dexon-solidity-372279ceb29b032cb977eeeb5df4c9495aebd206.zip |
Merge pull request #2819 from ethereum/compilerstack-typecheck
Simplify typechecking loop in compilerstack
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 15b06125..cf55ffac 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -87,16 +87,15 @@ parseAnalyseAndReturnError(string const& _source, bool _reportWarnings = false, success = false; } if (success) + { + TypeChecker typeChecker(errorReporter); for (ASTPointer<ASTNode> const& node: sourceUnit->nodes()) if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get())) { - globalContext->setCurrentContract(*contract); - resolver.updateDeclaration(*globalContext->currentThis()); - - TypeChecker typeChecker(errorReporter); bool success = typeChecker.checkTypeRequirements(*contract); BOOST_CHECK(success || !errorReporter.errors().empty()); } + } if (success) if (!PostTypeChecker(errorReporter).check(*sourceUnit)) success = false; |