From 675aed1edfcff1cf7cd68cc92582d987820e4729 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Thu, 15 Oct 2015 11:50:25 +0200 Subject: fixed new tests --- solc/jsonCompiler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'solc/jsonCompiler.cpp') 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); errors.append(formatError( *error, - (dynamic_pointer_cast(error)) ? "Warning" : "Error", + (err->type() == Error::Type::Warning) ? "Warning" : "Error", compiler )); + } success = succ; // keep success false on exception } catch (Error const& error) -- cgit