aboutsummaryrefslogtreecommitdiffstats
path: root/solc/jsonCompiler.cpp
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2015-10-15 17:50:25 +0800
committerLianaHus <liana@ethdev.com>2015-10-15 17:50:25 +0800
commit675aed1edfcff1cf7cd68cc92582d987820e4729 (patch)
tree480726e0c76b3b4401c8e51a0d9d4f24b8d84a22 /solc/jsonCompiler.cpp
parent7a7a7dcbb59e1126679e7e8f6eab16992fffb51c (diff)
downloaddexon-solidity-675aed1edfcff1cf7cd68cc92582d987820e4729.tar.gz
dexon-solidity-675aed1edfcff1cf7cd68cc92582d987820e4729.tar.zst
dexon-solidity-675aed1edfcff1cf7cd68cc92582d987820e4729.zip
fixed new tests
Diffstat (limited to 'solc/jsonCompiler.cpp')
-rw-r--r--solc/jsonCompiler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/solc/jsonCompiler.cpp b/solc/jsonCompiler.cpp
index 1cf539e5..0746fc88 100644
--- a/solc/jsonCompiler.cpp
+++ b/solc/jsonCompiler.cpp
@@ -127,11 +127,14 @@ string compile(string _input, bool _optimize)
{
bool succ = compiler.compile(_input, _optimize);
for (auto const& error: compiler.errors())
+ {
+ auto err = dynamic_pointer_cast<Error const>(error);
errors.append(formatError(
*error,
- (dynamic_pointer_cast<Warning const>(error)) ? "Warning" : "Error",
+ (err->type() == Error::Type::Warning) ? "Warning" : "Error",
compiler
));
+ }
success = succ; // keep success false on exception
}
catch (Error const& error)