parser: fix incorrect unused var message
parent
4443fef6c3
commit
c456ba6bde
|
@ -2623,6 +2623,7 @@ fn (p mut Parser) assoc() string {
|
||||||
p.error('unknown variable `$name`')
|
p.error('unknown variable `$name`')
|
||||||
exit(1)
|
exit(1)
|
||||||
}
|
}
|
||||||
|
p.mark_var_used(var)
|
||||||
p.check(.pipe)
|
p.check(.pipe)
|
||||||
p.gen('($var.typ){')
|
p.gen('($var.typ){')
|
||||||
mut fields := []string// track the fields user is setting, the rest will be copied from the old object
|
mut fields := []string// track the fields user is setting, the rest will be copied from the old object
|
||||||
|
|
Loading…
Reference in New Issue