patch 8.2.4231: Vim9: map() gives type error when type was not declared
Problem: Vim9: map() gives type error when type was not declared.
Solution: Only check the type when it was declared, like extend() does.
(closes #9635)
diff --git a/src/testdir/test_vim9_assign.vim b/src/testdir/test_vim9_assign.vim
index 7f4d87a..0af1d5b 100644
--- a/src/testdir/test_vim9_assign.vim
+++ b/src/testdir/test_vim9_assign.vim
@@ -1963,7 +1963,7 @@
var ll: list<number>
ll = [1, 2, 3]->map('"one"')
END
- CheckDefExecFailure(lines, 'E1012: Type mismatch; expected number but got string')
+ CheckDefExecFailure(lines, 'E1012: Type mismatch; expected list<number> but got list<string>')
enddef
def Test_cannot_use_let()