diff options
author | chriseth <chris@ethereum.org> | 2017-07-06 18:45:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-06 18:45:11 +0800 |
commit | 0fb4cb1ab9bb4b6cc72e28cc5a1753ad14781f14 (patch) | |
tree | 1031e61422e41884ecd548953f83ef4df9441f61 /libsolidity/interface/StandardCompiler.cpp | |
parent | 194ff033ae44944ac59aa7bd3da89ba94ec5893c (diff) | |
parent | 40d4ee49528affa1e88031920a9be57375ad5788 (diff) | |
download | dexon-solidity-0fb4cb1ab9bb4b6cc72e28cc5a1753ad14781f14.tar.gz dexon-solidity-0fb4cb1ab9bb4b6cc72e28cc5a1753ad14781f14.tar.zst dexon-solidity-0fb4cb1ab9bb4b6cc72e28cc5a1753ad14781f14.zip |
Merge pull request #2532 from ethereum/develop
Merge develop to release for 0.4.13.
Diffstat (limited to 'libsolidity/interface/StandardCompiler.cpp')
-rw-r--r-- | libsolidity/interface/StandardCompiler.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index e677afc8..15bb7592 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -71,7 +71,7 @@ Json::Value formatErrorWithException( ) { string message; - string formattedMessage = SourceReferenceFormatter::formatExceptionInformation(_exception, _message, _scannerFromSourceName); + string formattedMessage = SourceReferenceFormatter::formatExceptionInformation(_exception, _type, _scannerFromSourceName); // NOTE: the below is partially a copy from SourceReferenceFormatter SourceLocation const* location = boost::get_error_info<errinfo_sourceLocation>(_exception); @@ -271,12 +271,12 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) for (auto const& error: m_compilerStack.errors()) { - auto err = dynamic_pointer_cast<Error const>(error); + Error const& err = dynamic_cast<Error const&>(*error); errors.append(formatErrorWithException( *error, - err->type() == Error::Type::Warning, - err->typeName(), + err.type() == Error::Type::Warning, + err.typeName(), "general", "", scannerFromSourceName @@ -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 @@ -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++; |