fixed new tests

This commit is contained in:
LianaHus committed 2015-10-15 11:50:25 +02:00
1 parent 7a7a7dcbb5
commit 675aed1edf
6 files changed
+81 -50

No files matched your search

+4 -1
View File
@@ -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)