mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
ast:remove cached_name, as auto_str_methods free it
This commit is contained in:
parent
350747793b
commit
57e827a832
2 changed files with 1 additions and 8 deletions
|
@ -1094,7 +1094,6 @@ pub mut:
|
|||
mod string
|
||||
name string
|
||||
full_name string
|
||||
cached_name string
|
||||
kind IdentKind
|
||||
info IdentInfo
|
||||
is_mut bool // if mut *token* is before name. Use `is_mut()` to lookup mut variable
|
||||
|
|
|
@ -525,13 +525,7 @@ pub fn (x &Expr) str() string {
|
|||
return 'spawn ${x.call_expr}'
|
||||
}
|
||||
Ident {
|
||||
if x.cached_name != '' {
|
||||
return x.cached_name
|
||||
}
|
||||
unsafe {
|
||||
x.cached_name = util.strip_main_name(x.name.clone())
|
||||
}
|
||||
return x.cached_name
|
||||
return x.name.clone()
|
||||
}
|
||||
IfExpr {
|
||||
mut parts := []string{}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue