From 546f9a544f24d71b6623444f7f6038c681eb3119 Mon Sep 17 00:00:00 2001 From: yuyi Date: Sun, 26 Jun 2022 05:04:08 +0800 Subject: [PATCH] parser: fix a typo in an error message (#14848) --- vlib/v/parser/fn.v | 2 +- vlib/v/parser/tests/fn_decl_multi_return_types_err.out | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/v/parser/fn.v b/vlib/v/parser/fn.v index d9f21e075..3897c8afb 100644 --- a/vlib/v/parser/fn.v +++ b/vlib/v/parser/fn.v @@ -401,7 +401,7 @@ fn (mut p Parser) fn_decl() ast.FnDecl { } if p.tok.kind == .comma { mr_pos := return_type_pos.extend(p.peek_tok.pos()) - p.error_with_pos('multiple return types in function declaration must use parentheses, .e.g (int, string)', + p.error_with_pos('multiple return types in function declaration must use parentheses, e.g. (int, string)', mr_pos) } mut type_sym_method_idx := 0 diff --git a/vlib/v/parser/tests/fn_decl_multi_return_types_err.out b/vlib/v/parser/tests/fn_decl_multi_return_types_err.out index c587d39cf..d165b7386 100644 --- a/vlib/v/parser/tests/fn_decl_multi_return_types_err.out +++ b/vlib/v/parser/tests/fn_decl_multi_return_types_err.out @@ -1,4 +1,4 @@ -vlib/v/parser/tests/fn_decl_multi_return_types_err.vv:4:10: error: multiple return types in function declaration must use parentheses, .e.g (int, string) +vlib/v/parser/tests/fn_decl_multi_return_types_err.vv:4:10: error: multiple return types in function declaration must use parentheses, e.g. (int, string) 2 | } 3 | 4 | fn foo() int, int { -- 2.39.5