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
|
mod string
|
||||||
name string
|
name string
|
||||||
full_name string
|
full_name string
|
||||||
cached_name string
|
|
||||||
kind IdentKind
|
kind IdentKind
|
||||||
info IdentInfo
|
info IdentInfo
|
||||||
is_mut bool // if mut *token* is before name. Use `is_mut()` to lookup mut variable
|
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}'
|
return 'spawn ${x.call_expr}'
|
||||||
}
|
}
|
||||||
Ident {
|
Ident {
|
||||||
if x.cached_name != '' {
|
return x.name.clone()
|
||||||
return x.cached_name
|
|
||||||
}
|
|
||||||
unsafe {
|
|
||||||
x.cached_name = util.strip_main_name(x.name.clone())
|
|
||||||
}
|
|
||||||
return x.cached_name
|
|
||||||
}
|
}
|
||||||
IfExpr {
|
IfExpr {
|
||||||
mut parts := []string{}
|
mut parts := []string{}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue