1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

compiler: fix line numbers in unused variable error messages

This commit is contained in:
Delyan Angelov
2019-09-20 13:42:37 +03:00
committed by Alexander Medvednikov
parent f657d70a67
commit f042dfb861
4 changed files with 51 additions and 13 deletions

View File

@ -71,7 +71,6 @@ mut:
ref bool
parent_fn string // Variables can only be defined in functions
mod string // module where this var is stored
line_nr int
access_mod AccessMod
is_global bool // __global (translated from C only)
is_used bool
@ -79,6 +78,8 @@ mut:
scope_level int
is_c bool // todo remove once `typ` is `Type`, not string
moved bool
scanner_pos ScannerPos // TODO: use only scanner_pos, remove line_nr
line_nr int
}
struct Type {