From bea0d500d018debb90f62e9a3271aac62b2f179b Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 26 Mar 2022 21:20:28 +0200 Subject: [PATCH] parser: ignore upper letter case restriction for `fn C.xyz` declarations --- vlib/v/parser/fn.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/parser/fn.v b/vlib/v/parser/fn.v index dc755e0ec4..fd72618bc3 100644 --- a/vlib/v/parser/fn.v +++ b/vlib/v/parser/fn.v @@ -834,7 +834,7 @@ fn (mut p Parser) fn_args() ([]ast.Param, bool, bool) { mut arg_pos := [p.tok.pos()] name := p.check_name() mut arg_names := [name] - if name.len > 0 && name[0].is_capital() { + if name.len > 0 && p.fn_language == .v && name[0].is_capital() { p.error_with_pos('parameter name must not begin with upper case letter (`${arg_names[0]}`)', p.prev_tok.pos()) }