0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

patch 8.2.3111: Vim9: confusing error with extra whitespace before colon

Problem:    Vim9: confusing error with extra whitespace before colon.
Solution:   Check for colon after white space. (closes #8513)
This commit is contained in:
Bram Moolenaar
2021-07-05 21:41:48 +02:00
parent 04db26b360
commit 404557e6a6
4 changed files with 22 additions and 5 deletions

View File

@@ -2566,6 +2566,13 @@ def Test_for_loop_fails()
endfor
END
CheckDefAndScriptFailure(lines, 'E1012: Type mismatch; expected number but got string', 1)
lines =<< trim END
for n : number in [1, 2]
echo n
endfor
END
CheckDefAndScriptFailure(lines, 'E1059:', 1)
enddef
def Test_for_loop_script_var()