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

force mut a := ..., do not allow mut a = ...

This commit is contained in:
Alexander Medvednikov
2019-06-28 14:19:46 +02:00
parent 806ad80360
commit 42bb85197a
6 changed files with 15 additions and 31 deletions

View File

@ -129,7 +129,7 @@ fn (s mut Scanner) skip_whitespace() {
}
fn (s mut Scanner) get_var_name(pos int) string {
mut pos_start = pos
mut pos_start := pos
for ; pos_start >= 0 && s.text[pos_start] != `\n` && s.text[pos_start] != `;`; pos_start-- {}
pos_start++