cgen: fix gen_cross_tmp_variable, part 2
parent
625ed030ef
commit
66f36f6dcc
|
@ -1301,7 +1301,8 @@ fn (mut g Gen) gen_cross_tmp_variable(left []ast.Expr, val ast.Expr) {
|
|||
if lx is ast.Ident {
|
||||
ident := lx as ast.Ident
|
||||
if val.name == ident.name {
|
||||
g.write('_var_$ident.pos.pos')
|
||||
g.write('_var_')
|
||||
g.write(ident.pos.pos.str())
|
||||
has_var = true
|
||||
break
|
||||
}
|
||||
|
@ -1342,7 +1343,8 @@ fn (mut g Gen) gen_cross_tmp_variable(left []ast.Expr, val ast.Expr) {
|
|||
mut has_var := false
|
||||
for lx in left {
|
||||
if val_.str() == lx.str() {
|
||||
g.write('_var_${lx.position()}.pos')
|
||||
g.write('_var_')
|
||||
g.write(lx.position().pos.str())
|
||||
has_var = true
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue