Mercurial > vim
comparison src/testdir/test_vim9_assign.vim @ 22618:c2d8b596dd0f v8.2.1857
patch 8.2.1857: Vim9: using job_status() on an unused var gives an error
Commit: https://github.com/vim/vim/commit/218450ad5ea1f9f033b06754a29502d86100ff65
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 17 18:51:52 2020 +0200
patch 8.2.1857: Vim9: using job_status() on an unused var gives an error
Problem: Vim9: using job_status() on an unused var gives an error.
Solution: Return "fail". (closes https://github.com/vim/vim/issues/7158)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 17 Oct 2020 19:00:05 +0200 |
parents | 08e2363fd0de |
children | 576a69fc0066 |
comparison
equal
deleted
inserted
replaced
22617:c1bb78e32bf1 | 22618:c2d8b596dd0f |
---|---|
72 var a: number = 6 #comment | 72 var a: number = 6 #comment |
73 assert_equal(6, a) | 73 assert_equal(6, a) |
74 | 74 |
75 if has('channel') | 75 if has('channel') |
76 var chan1: channel | 76 var chan1: channel |
77 assert_equal('fail', ch_status(chan1)) | |
78 | |
77 var job1: job | 79 var job1: job |
80 assert_equal('fail', job_status(job1)) | |
81 | |
78 # calling job_start() is in test_vim9_fails.vim, it causes leak reports | 82 # calling job_start() is in test_vim9_fails.vim, it causes leak reports |
79 endif | 83 endif |
80 if has('float') | 84 if has('float') |
81 var float1: float = 3.4 | 85 var float1: float = 3.4 |
82 endif | 86 endif |