aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-05-26 17:13:43 +0800
committerGitHub <noreply@github.com>2017-05-26 17:13:43 +0800
commite1519f4f271ea1e2a1aedb74df8b1cfd68d8c5a0 (patch)
treeee5dc81b7a8da0b4816b41fb0b92b7696f890a86
parent534d8008e21244680d9a584c05552e2297e3e3b7 (diff)
parent40d5d5a956ab8ace804597e7af29397f477eaf40 (diff)
downloaddexon-solidity-e1519f4f271ea1e2a1aedb74df8b1cfd68d8c5a0.tar.gz
dexon-solidity-e1519f4f271ea1e2a1aedb74df8b1cfd68d8c5a0.tar.zst
dexon-solidity-e1519f4f271ea1e2a1aedb74df8b1cfd68d8c5a0.zip
Merge pull request #2307 from ethereum/compilerstack
Scanner requires only the SourcesSet state
-rw-r--r--libsolidity/interface/CompilerStack.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp
index 72712298..328df91f 100644
--- a/libsolidity/interface/CompilerStack.cpp
+++ b/libsolidity/interface/CompilerStack.cpp
@@ -507,8 +507,8 @@ string const& CompilerStack::onChainMetadata(string const& _contractName) const
Scanner const& CompilerStack::scanner(string const& _sourceName) const
{
- if (m_stackState < ParsingSuccessful)
- BOOST_THROW_EXCEPTION(CompilerError() << errinfo_comment("Parsing was not successful."));
+ if (m_stackState < SourcesSet)
+ BOOST_THROW_EXCEPTION(CompilerError() << errinfo_comment("No sources set."));
return *source(_sourceName).scanner;
}