patch 9.0.2012: Vim9: error message can be more accurate
Problem: Vim9: error message can be more accurate
Solution: Fix the error messages
Fix message for some single use error messages.
closes: #13312
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
diff --git a/src/testdir/test_listdict.vim b/src/testdir/test_listdict.vim
index b7c8ad7..09e73ef 100644
--- a/src/testdir/test_listdict.vim
+++ b/src/testdir/test_listdict.vim
@@ -435,13 +435,13 @@
let n = 0
let n.key = 3
END
- call v9.CheckScriptFailure(lines, 'E1203: Dot can only be used on a dictionary: n.key = 3')
+ call v9.CheckScriptFailure(lines, 'E1203: Dot not allowed after a number: n.key = 3')
let lines =<< trim END
vim9script
var n = 0
n.key = 3
END
- call v9.CheckScriptFailure(lines, 'E1203: Dot can only be used on a dictionary: n.key = 3')
+ call v9.CheckScriptFailure(lines, 'E1203: Dot not allowed after a number: n.key = 3')
let lines =<< trim END
var n = 0
n.key = 3
diff --git a/src/testdir/test_vim9_assign.vim b/src/testdir/test_vim9_assign.vim
index 07afadb..3a18777 100644
--- a/src/testdir/test_vim9_assign.vim
+++ b/src/testdir/test_vim9_assign.vim
@@ -1278,7 +1278,7 @@
var n: any
n.key = 5
END
- v9.CheckDefExecAndScriptFailure(lines, ['E1148:', 'E1203: Dot can only be used on a dictionary: n.key = 5'], 2)
+ v9.CheckDefExecAndScriptFailure(lines, ['E1148:', 'E1203: Dot not allowed after a number: n.key = 5'], 2)
enddef
def Test_assignment_local()