mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Move lambda.
This commit is contained in:
parent
41236cd08c
commit
455e8a4ef8
@ -592,8 +592,12 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly)
|
|||||||
// Inline assembly does not have its own type-checking phase, so we just run the
|
// Inline assembly does not have its own type-checking phase, so we just run the
|
||||||
// code-generator and see whether it produces any errors.
|
// code-generator and see whether it produces any errors.
|
||||||
// External references have already been resolved in a prior stage and stored in the annotation.
|
// External references have already been resolved in a prior stage and stored in the annotation.
|
||||||
assembly::CodeGenerator codeGen(_inlineAssembly.operations(), m_errors);
|
auto identifierAccess = [&](
|
||||||
if (!codeGen.typeCheck([&](assembly::Identifier const& _identifier, eth::Assembly& _assembly, assembly::CodeGenerator::IdentifierContext _context) {
|
assembly::Identifier const& _identifier,
|
||||||
|
eth::Assembly& _assembly,
|
||||||
|
assembly::CodeGenerator::IdentifierContext _context
|
||||||
|
)
|
||||||
|
{
|
||||||
auto ref = _inlineAssembly.annotation().externalReferences.find(&_identifier);
|
auto ref = _inlineAssembly.annotation().externalReferences.find(&_identifier);
|
||||||
if (ref == _inlineAssembly.annotation().externalReferences.end())
|
if (ref == _inlineAssembly.annotation().externalReferences.end())
|
||||||
return false;
|
return false;
|
||||||
@ -641,7 +645,9 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}))
|
};
|
||||||
|
assembly::CodeGenerator codeGen(_inlineAssembly.operations(), m_errors);
|
||||||
|
if (!codeGen.typeCheck(identifierAccess))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user