Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### 0.4.13 (unreleased)

Bugfixes:
* Compiler Interface: Only output AST if analysis was successful.
* Code Generator: Correctly unregister modifier variables.

### 0.4.12 (2017-07-03)
Expand Down
4 changes: 2 additions & 2 deletions libsolidity/interface/StandardCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input)
if (errors.size() > 0)
output["errors"] = errors;

bool parsingSuccess = m_compilerStack.state() >= CompilerStack::State::ParsingSuccessful;
bool analysisSuccess = m_compilerStack.state() >= CompilerStack::State::AnalysisSuccessful;
bool compilationSuccess = m_compilerStack.state() == CompilerStack::State::CompilationSuccessful;

/// Inconsistent state - stop here to receive error reports from users
Expand All @@ -366,7 +366,7 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input)

output["sources"] = Json::objectValue;
unsigned sourceIndex = 0;
for (auto const& source: parsingSuccess ? m_compilerStack.sourceNames() : vector<string>())
for (auto const& source: analysisSuccess ? m_compilerStack.sourceNames() : vector<string>())
{
Json::Value sourceResult = Json::objectValue;
sourceResult["id"] = sourceIndex++;
Expand Down