Skip to content

Commit 7eb2bea

Browse files
authored
Print diagnostics in each interactive loop (#2809)
1 parent 728fb21 commit 7eb2bea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/bin/lpython.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,8 @@ int interactive_python_repl(
886886
res = fe.evaluate(code_string, verbose, lm, pass_manager, diagnostics);
887887
if (res.ok) {
888888
r = res.result;
889+
std::cerr << diagnostics.render(lm, compiler_options);
890+
diagnostics.clear();
889891
} else {
890892
LCOMPILERS_ASSERT(diagnostics.has_error())
891893
std::cerr << diagnostics.render(lm, compiler_options);

0 commit comments

Comments
 (0)