diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-25 22:49:33 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-25 22:49:33 +0800 |
commit | 8bc76ecf58b3e57ccfbc69da5e9633bae490ca92 (patch) | |
tree | aa7651752f29145516728e8f32dbeb158240842b /test | |
parent | e6f55fb95e913a5167ebd1f43a0eebb8b6d17daf (diff) | |
download | dexon-solidity-8bc76ecf58b3e57ccfbc69da5e9633bae490ca92.tar.gz dexon-solidity-8bc76ecf58b3e57ccfbc69da5e9633bae490ca92.tar.zst dexon-solidity-8bc76ecf58b3e57ccfbc69da5e9633bae490ca92.zip |
Update SolidityNameAndTypeResolution to match 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 380978e8..9333b62d 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; |