mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: ignore upper letter case restriction for fn C.xyz
declarations
This commit is contained in:
parent
fcb57312b9
commit
bea0d500d0
@ -834,7 +834,7 @@ fn (mut p Parser) fn_args() ([]ast.Param, bool, bool) {
|
|||||||
mut arg_pos := [p.tok.pos()]
|
mut arg_pos := [p.tok.pos()]
|
||||||
name := p.check_name()
|
name := p.check_name()
|
||||||
mut arg_names := [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.error_with_pos('parameter name must not begin with upper case letter (`${arg_names[0]}`)',
|
||||||
p.prev_tok.pos())
|
p.prev_tok.pos())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user