Skip to content

Commit

Permalink
vdoc: prevent leaking to the docs the pure_v_but_overriden_by_ prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Oct 14, 2021
1 parent 0588505 commit 4c2cb1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vlib/v/parser/fn.v
Expand Up @@ -421,7 +421,9 @@ fn (mut p Parser) fn_decl() ast.FnDecl {
if existing.name != '' {
if file_mode == .v && existing.file_mode != .v {
// a definition made in a .c.v file, should have a priority over a .v file definition of the same function
name = p.prepend_mod('pure_v_but_overriden_by_${existing.file_mode}_$short_fn_name')
if !p.pref.is_fmt {
name = p.prepend_mod('pure_v_but_overriden_by_${existing.file_mode}_$short_fn_name')
}
} else {
p.table.redefined_fns << name
}
Expand Down

0 comments on commit 4c2cb1b

Please sign in to comment.