From 2e3815acdfc4ba109652c835d4762f0155f5c625 Mon Sep 17 00:00:00 2001 From: kalsprite Date: Tue, 4 Aug 2026 18:16:25 -0700 Subject: [PATCH] fix new line suppression --- src/check_expr.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 48372f701..c29e69d7d 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -7131,7 +7131,9 @@ gb_internal bool evaluate_where_clauses(CheckerContext *ctx, Ast *call_expr, Sco Entity *e = entry.value; switch (e->kind) { case Entity_TypeName: { - // if (print_count == 0) error_line("\n\tWith the following definitions:\n"); + // NOTE: the leading " " is required; a genuinely empty line + // terminates the error message when it is printed. + if (print_count == 0) error_line(" \n\tWith the following definitions:\n"); gbString str = type_to_string(e->type); error_line("\t\t%.*s :: %s;\n", LIT(e->token.string), str); @@ -7140,7 +7142,7 @@ gb_internal bool evaluate_where_clauses(CheckerContext *ctx, Ast *call_expr, Sco break; } case Entity_Constant: { - if (print_count == 0) error_line("\n\tWith the following definitions:\n"); + if (print_count == 0) error_line(" \n\tWith the following definitions:\n"); gbString str = exact_value_to_string(e->Constant.value); if (is_type_untyped(e->type)) {