v.parser: fix compilation of normal .v files with -translated (#13363)

pull/13383/head
div72 2022-02-06 13:53:20 +03:00 committed by GitHub
parent 31739c2586
commit 939bc9f26f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -426,7 +426,7 @@ fn (mut p Parser) fn_decl() ast.FnDecl {
} else {
name = p.prepend_mod(name)
}
if !p.pref.translated && language == .v {
if language == .v {
if existing := p.table.fns[name] {
if existing.name != '' {
if file_mode == .v && existing.file_mode != .v {