From 1ef4675ae0dddeb972a2b0c9366585138ea445cc Mon Sep 17 00:00:00 2001 From: hankluo6 Date: Tue, 10 Sep 2024 22:42:49 -0500 Subject: [PATCH] Print diagnostics in each interactive loop --- src/bin/lpython.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/lpython.cpp b/src/bin/lpython.cpp index e5d2a9041f..be8af27d0c 100644 --- a/src/bin/lpython.cpp +++ b/src/bin/lpython.cpp @@ -886,6 +886,8 @@ int interactive_python_repl( res = fe.evaluate(code_string, verbose, lm, pass_manager, diagnostics); if (res.ok) { r = res.result; + std::cerr << diagnostics.render(lm, compiler_options); + diagnostics.clear(); } else { LCOMPILERS_ASSERT(diagnostics.has_error()) std::cerr << diagnostics.render(lm, compiler_options);