From 8bc76ecf58b3e57ccfbc69da5e9633bae490ca92 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 25 Aug 2017 15:49:33 +0100 Subject: Update SolidityNameAndTypeResolution to match CompilerStack --- test/libsolidity/SolidityNameAndTypeResolution.cpp | 7 +++---- 1 file 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 const& node: sourceUnit->nodes()) if (ContractDefinition* contract = dynamic_cast(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; -- cgit