From 7d7f9ec67f69d66fa6872072e63272a53ff30dcd Mon Sep 17 00:00:00 2001 From: Lu Guanqun Date: Sat, 28 Feb 2015 16:20:11 +0800 Subject: [PATCH] fix test code due to API changes in DeclarationContainer --- SolidityExpressionCompiler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SolidityExpressionCompiler.cpp b/SolidityExpressionCompiler.cpp index 7034085ef..fa01ce1c9 100644 --- a/SolidityExpressionCompiler.cpp +++ b/SolidityExpressionCompiler.cpp @@ -79,7 +79,9 @@ Declaration const& resolveDeclaration( // bracers are required, cause msvc couldnt handle this macro in for statement for (string const& namePart: _namespacedName) { - BOOST_REQUIRE(declaration = _resolver.resolveName(namePart, declaration)); + auto declarations = _resolver.resolveName(namePart, declaration); + BOOST_REQUIRE(!declarations.empty()); + BOOST_REQUIRE(declaration = *declarations.begin()); } BOOST_REQUIRE(declaration); return *declaration;