Skip to content

Commit

Permalink
ast: fix const field str()
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyi98 committed Sep 10, 2024
1 parent dd3e3e1 commit f1f5ef5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
9 changes: 0 additions & 9 deletions vlib/v/ast/str.v
Original file line number Diff line number Diff line change
Expand Up @@ -518,15 +518,6 @@ pub fn (x &Expr) str() string {
if x.cached_name != '' {
return x.cached_name
}
if obj := x.scope.find('${x.mod}.${x.name}') {
if obj is ConstField && x.mod != 'main' {
last_mod := x.mod.all_after_last('.')
unsafe {
x.cached_name = '${last_mod}.${x.name}'
}
return x.cached_name
}
}
unsafe {
x.cached_name = x.name.clone()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ pub mut:

end_line u8 = `\n`
end_line_len int = endline_cr_len // size of the endline rune \n = 1, \r\n = 2
separator u8 = `,` // comma is the default separator
separator_len int = 1 // size of the separator rune
quote u8 = `"` // double quote is the standard quote char
separator u8 = `,` // comma is the default separator
separator_len int = 1 // size of the separator rune
quote u8 = `"` // double quote is the standard quote char
quote_remove bool // if true clear the cell from the quotes
comment u8 = `#` // every line that start with the quote char is ignored

Expand Down

0 comments on commit f1f5ef5

Please sign in to comment.