From 81f8e910e63835eb55032912c9577b0e1ec5ef9b Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 29 Jul 2020 18:38:51 +0300 Subject: [PATCH] compiler: remove space at the end of warn/error messages to minimize diff churn --- vlib/v/tests/repl/error.repl | 2 +- vlib/v/util/errors.v | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/v/tests/repl/error.repl b/vlib/v/tests/repl/error.repl index d9ff984aff..7d7ceb5de0 100644 --- a/vlib/v/tests/repl/error.repl +++ b/vlib/v/tests/repl/error.repl @@ -1,6 +1,6 @@ println(a) ===output=== -.vrepl.v:7:9: error: undefined ident: `a` +.vrepl.v:7:9: error: undefined ident: `a` 5 | import math 6 | 7 | println(a) diff --git a/vlib/v/util/errors.v b/vlib/v/util/errors.v index 9007002177..04958e1af2 100644 --- a/vlib/v/util/errors.v +++ b/vlib/v/util/errors.v @@ -98,7 +98,7 @@ pub fn formatted_error(kind, omsg, filepath string, pos token.Position) string { final_msg := emsg final_context := if scontext.len > 0 { '\n$scontext' } else { '' } // - return '$final_position $final_kind $final_msg $final_context'.trim_space() + return '$final_position $final_kind $final_msg$final_context'.trim_space() } pub fn source_context(kind, source string, column int, pos token.Position) []string {