Skip to content

Commit

Permalink
Assert that at least parsing was performed.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed Sep 2, 2020
1 parent e725340 commit bb3f942
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libsolidity/interface/CompilerStack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,8 @@ void CompilerStack::link()

vector<string> CompilerStack::contractNames() const
{
if (m_stackState < Parsed)
BOOST_THROW_EXCEPTION(CompilerError() << errinfo_comment("Parsing was not successful."));
vector<string> contractNames;
for (auto const& contract: m_contracts)
contractNames.push_back(contract.first);
Expand Down

0 comments on commit bb3f942

Please sign in to comment.