aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-02-15 23:47:54 +0800
committerchriseth <c@ethdev.com>2017-03-03 22:41:01 +0800
commit25dcfa3480b2265d6dbb798849bfaadebc9a405c (patch)
tree73709b9710dad4fba4cd86753093c2880c40e79f /libsolidity/analysis
parent7f2def89715a7ec663afa0e7342d6a4fa8d5b316 (diff)
downloaddexon-solidity-25dcfa3480b2265d6dbb798849bfaadebc9a405c.tar.gz
dexon-solidity-25dcfa3480b2265d6dbb798849bfaadebc9a405c.tar.zst
dexon-solidity-25dcfa3480b2265d6dbb798849bfaadebc9a405c.zip
Refactor CodeGen to recurse on blocks.
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index ff55ef1f..66f5de6a 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -593,7 +593,7 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly)
// code-generator and see whether it produces any errors.
// External references have already been resolved in a prior stage and stored in the annotation.
assembly::CodeGenerator codeGen(_inlineAssembly.operations(), m_errors);
- codeGen.typeCheck([&](assembly::Identifier const& _identifier, eth::Assembly& _assembly, assembly::CodeGenerator::IdentifierContext _context) {
+ if (!codeGen.typeCheck([&](assembly::Identifier const& _identifier, eth::Assembly& _assembly, assembly::CodeGenerator::IdentifierContext _context) {
auto ref = _inlineAssembly.annotation().externalReferences.find(&_identifier);
if (ref == _inlineAssembly.annotation().externalReferences.end())
return false;
@@ -641,8 +641,9 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly)
return false;
}
return true;
- });
- return false;
+ }))
+ return false;
+ return true;
}
bool TypeChecker::visit(IfStatement const& _ifStatement)