comparison src/testdir/test_vim9_assign.vim @ 25405:747ebbce2421 v8.2.3239

patch 8.2.3239: Vim9: no error using heredoc for a number variable Commit: https://github.com/vim/vim/commit/81530e36033dec2c2cd94af6dd48ceb0389e95a2 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 28 21:25:49 2021 +0200 patch 8.2.3239: Vim9: no error using heredoc for a number variable Problem: Vim9: no error using heredoc for a number variable. Solution: Add a type check. (closes https://github.com/vim/vim/issues/8627)
author Bram Moolenaar <Bram@vim.org>
date Wed, 28 Jul 2021 21:30:04 +0200
parents 5c7192180b89
children 21b70bab366c
comparison
equal deleted inserted replaced
25404:d713f6697450 25405:747ebbce2421
1390 enddef 1390 enddef
1391 call Func() 1391 call Func()
1392 [END] 1392 [END]
1393 CheckScriptFailure(lines, 'E1145: Missing heredoc end marker: END') 1393 CheckScriptFailure(lines, 'E1145: Missing heredoc end marker: END')
1394 delfunc! g:Func 1394 delfunc! g:Func
1395
1396 lines =<< trim END
1397 var lines: number =<< trim STOP
1398 aaa
1399 bbb
1400 STOP
1401 END
1402 CheckDefAndScriptFailure(lines, 'E1012: Type mismatch; expected number but got list<string>', 1)
1395 enddef 1403 enddef
1396 1404
1397 def Test_var_func_call() 1405 def Test_var_func_call()
1398 var lines =<< trim END 1406 var lines =<< trim END
1399 vim9script 1407 vim9script