1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fix typos

This commit is contained in:
Turiiya 2023-05-11 20:29:31 +02:00
parent acef3994db
commit d6c567b03b
2 changed files with 3 additions and 3 deletions

View File

@ -356,7 +356,7 @@ fn (mut c Checker) assign_stmt(mut node ast.AssignStmt) {
} }
} }
if left.mod == left.name && !c.file.path.contains('vlib') { if left.mod == left.name && !c.file.path.contains('vlib') {
c.error('duplicate of an module name `${left.name}`', left.pos) c.error('duplicate of a module name `${left.name}`', left.pos)
} }
// Check if variable name is already registered as imported module symbol // Check if variable name is already registered as imported module symbol
if c.check_import_sym_conflict(left.name) { if c.check_import_sym_conflict(left.name) {

View File

@ -257,7 +257,7 @@ fn (mut c Checker) fn_decl(mut node ast.FnDecl) {
} }
} }
if node.mod == param.name && !c.file.path.contains('vlib') { if node.mod == param.name && !c.file.path.contains('vlib') {
c.error('duplicate of an module name `${param.name}`', param.pos) c.error('duplicate of a module name `${param.name}`', param.pos)
} }
// Check if parameter name is already registered as imported module symbol // Check if parameter name is already registered as imported module symbol
if c.check_import_sym_conflict(param.name) { if c.check_import_sym_conflict(param.name) {
@ -265,7 +265,7 @@ fn (mut c Checker) fn_decl(mut node ast.FnDecl) {
} }
} }
if node.mod == node.short_name && !c.file.path.contains('vlib') && node.mod != 'main' { if node.mod == node.short_name && !c.file.path.contains('vlib') && node.mod != 'main' {
c.error('duplicate of an module name `${node.short_name}`', node.pos) c.error('duplicate of a module name `${node.short_name}`', node.pos)
} }
// Check if function name is already registered as imported module symbol // Check if function name is already registered as imported module symbol
if !node.is_method && c.check_import_sym_conflict(node.short_name) { if !node.is_method && c.check_import_sym_conflict(node.short_name) {