From 7eb2bea75234ee7a99158871175bc0bb7df63fb1 Mon Sep 17 00:00:00 2001 From: "LO, CHIN-HAO" <49036880+hankluo6@users.noreply.github.com> Date: Thu, 12 Sep 2024 11:45:41 -0700 Subject: [PATCH] Print diagnostics in each interactive loop (#2809) --- 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);