parser: ignore upper letter case restriction for `fn C.xyz` declarations

pull/13836/head
Delyan Angelov 2022-03-26 21:20:28 +02:00
parent fcb57312b9
commit bea0d500d0
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 1 additions and 1 deletions

View File

@ -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())
}