From 2046ae78df8af7de984960727adab0d7a2aecb5d Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 28 May 2020 00:56:28 +0300 Subject: [PATCH] builder: improve `redefinition of function` messages --- vlib/v/builder/builder.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlib/v/builder/builder.v b/vlib/v/builder/builder.v index fd515ee71c..701293074a 100644 --- a/vlib/v/builder/builder.v +++ b/vlib/v/builder/builder.v @@ -267,7 +267,8 @@ fn (b &Builder) print_warnings_and_errors() { if stmt is ast.FnDecl { f := stmt as ast.FnDecl if f.name == fn_name { - println(file.path + ':' + f.pos.line_nr.str()) + fline := f.pos.line_nr + println('${file.path}:${fline}:') } } }