v
v copied to clipboard
Wrong line number for the last @ token in multiple assignment.
V doctor:
OS: linux, Ubuntu 20.04.3 LTS
Processor: 4 cpus, 64bit, little endian, Intel(R) Core(TM) i3-3225 CPU @ 3.30GHz
CC version: cc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
getwd: /v/vnew
vmodules: /home/delian/.vmodules
vroot: /v/vnew
vexe: /v/vnew/v
vexe mtime: 2022-09-05 13:54:49
is vroot writable: true
is vmodules writable: true
V full version: V 0.3.1 f285ebd.066884c
Git version: git version 2.25.1
Git vroot status: 0.3.1-13-g066884c9-dirty (9 commit(s) behind V master)
.git/config present: true
thirdparty/tcc status: stable-thirdparty-linux-amd64 827f7452
What did you do?
v -g -o vdbg cmd/v && vdbg bug.v
line1, line2, line3 := @LINE, @LINE, @LINE
dump(line1)
dump(line2)
dump(line3)
What did you expect to see?
all lines reporting the same number 1
What did you see instead?
[bug.v:2] line1: 1
[bug.v:3] line2: 1
[bug.v:4] line3: 2