mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.2.3055: strange error for assigning to "x.key" on non-dictionary
Problem: Strange error for assigning to "x.key" on non-dictionary. Solution: Add a specific error message. (closes #8451)
This commit is contained in:
@@ -787,6 +787,12 @@ def Test_assignment_dict()
|
||||
d.dd[0] = 0
|
||||
END
|
||||
CheckDefExecFailure(lines, 'E1148:', 2)
|
||||
|
||||
lines =<< trim END
|
||||
var n: any
|
||||
n.key = 5
|
||||
END
|
||||
CheckDefExecAndScriptFailure2(lines, 'E1148:', 'E1203: Dot can only be used on a dictionary: n.key = 5', 2)
|
||||
enddef
|
||||
|
||||
def Test_assignment_local()
|
||||
|
Reference in New Issue
Block a user