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

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

This commit is contained in:
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

View File

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