mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: remove it
smartcast and replace with original variable name (#5764)
This commit is contained in:
@ -389,13 +389,13 @@ pub fn (i &Ident) var_info() IdentVar {
|
||||
|
||||
pub struct InfixExpr {
|
||||
pub:
|
||||
op token.Kind
|
||||
pos token.Position
|
||||
left Expr
|
||||
right Expr
|
||||
op token.Kind
|
||||
pos token.Position
|
||||
left Expr
|
||||
right Expr
|
||||
pub mut:
|
||||
left_type table.Type
|
||||
right_type table.Type
|
||||
left_type table.Type
|
||||
right_type table.Type
|
||||
}
|
||||
|
||||
pub struct PostfixExpr {
|
||||
@ -443,6 +443,7 @@ pub:
|
||||
comments []Comment
|
||||
pub mut:
|
||||
smartcast bool // should only be true if cond is `x is sumtype`, it will be set in checker - if_expr
|
||||
left_as_name string // only used in x is SumType check
|
||||
}
|
||||
|
||||
pub struct LockExpr {
|
||||
|
@ -279,7 +279,7 @@ pub fn (node Stmt) str() string {
|
||||
mut out := ''
|
||||
for i, left in it.left {
|
||||
if left is Ident {
|
||||
var_info := it.var_info()
|
||||
var_info := left.var_info()
|
||||
if var_info.is_mut {
|
||||
out += 'mut '
|
||||
}
|
||||
|
Reference in New Issue
Block a user