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

patch 8.2.2173: Vim9: get internal error when assigning to undefined variable

Problem:    Vim9: get internal error when assigning to undefined variable.
Solution:   Add error message. (closes #7475)
This commit is contained in:
Bram Moolenaar
2020-12-20 21:43:35 +01:00
parent 5082471f91
commit 52c124d330
5 changed files with 19 additions and 4 deletions

View File

@@ -710,5 +710,16 @@ def Test_ambiguous_user_cmd()
CheckScriptFailure(lines, 'E464:')
enddef
def Test_command_not_recognized()
var lines =<< trim END
d.key = 'asdf'
END
CheckDefFailure(lines, 'E1146:', 1)
lines =<< trim END
d['key'] = 'asdf'
END
CheckDefFailure(lines, 'E1146:', 1)
enddef
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker