diff options
author | chriseth <chris@ethereum.org> | 2017-05-31 18:54:18 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-06-08 21:52:45 +0800 |
commit | ba5ee71b7f7b1ac5d6bc4b3a70dde36b34d20d8e (patch) | |
tree | ac09c42a776674936318188a6a9a31c2a742437e /libsolidity/analysis/ReferencesResolver.cpp | |
parent | b75c7b577583721a853a01a070f5497d702d17f0 (diff) | |
download | dexon-solidity-ba5ee71b7f7b1ac5d6bc4b3a70dde36b34d20d8e.tar dexon-solidity-ba5ee71b7f7b1ac5d6bc4b3a70dde36b34d20d8e.tar.gz dexon-solidity-ba5ee71b7f7b1ac5d6bc4b3a70dde36b34d20d8e.tar.bz2 dexon-solidity-ba5ee71b7f7b1ac5d6bc4b3a70dde36b34d20d8e.tar.lz dexon-solidity-ba5ee71b7f7b1ac5d6bc4b3a70dde36b34d20d8e.tar.xz dexon-solidity-ba5ee71b7f7b1ac5d6bc4b3a70dde36b34d20d8e.tar.zst dexon-solidity-ba5ee71b7f7b1ac5d6bc4b3a70dde36b34d20d8e.zip |
Generate only single error in inline assembly.
Diffstat (limited to 'libsolidity/analysis/ReferencesResolver.cpp')
-rw-r--r-- | libsolidity/analysis/ReferencesResolver.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libsolidity/analysis/ReferencesResolver.cpp b/libsolidity/analysis/ReferencesResolver.cpp index d814f5ec..edf2fc02 100644 --- a/libsolidity/analysis/ReferencesResolver.cpp +++ b/libsolidity/analysis/ReferencesResolver.cpp @@ -191,7 +191,7 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly) if (auto var = dynamic_cast<VariableDeclaration const*>(declarations.front())) if (var->isLocalVariable() && _crossesFunctionBoundary) { - m_errorReporter.declarationError(_identifier.location, "Cannot access local Solidity variables from inside an inline assembly function."); + declarationError(_identifier.location, "Cannot access local Solidity variables from inside an inline assembly function."); return size_t(-1); } _inlineAssembly.annotation().externalReferences[&_identifier].isSlot = isSlot; @@ -321,6 +321,12 @@ void ReferencesResolver::fatalTypeError(SourceLocation const& _location, string m_errorReporter.fatalTypeError(_location, _description); } +void ReferencesResolver::declarationError(SourceLocation const& _location, string const& _description) +{ + m_errorOccurred = true; + m_errorReporter.declarationError(_location, _description); +} + void ReferencesResolver::fatalDeclarationError(SourceLocation const& _location, string const& _description) { m_errorOccurred = true; |