comparison src/testdir/test_vim9_script.vim @ 19564:06f29b6ea04a v8.2.0339

patch 8.2.0339: Vim9: function return type may depend on arguments Commit: https://github.com/vim/vim/commit/fbdd08ed9b1798885915c7f27c94786906d258e4 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 1 14:04:46 2020 +0100 patch 8.2.0339: Vim9: function return type may depend on arguments Problem: Vim9: function return type may depend on arguments. Solution: Instead of a fixed return type use a function to figure out the return type.
author Bram Moolenaar <Bram@vim.org>
date Sun, 01 Mar 2020 14:15:04 +0100
parents 8eeec8886c02
children ec1eeb1b69e2
comparison
equal deleted inserted replaced
19563:5d3a4b28a95b 19564:06f29b6ea04a
53 let dict4: dict<any> = #{one: 1, two: '2'} 53 let dict4: dict<any> = #{one: 1, two: '2'}
54 let dict5: dict<blob> = #{one: 0z01, tw: 0z02} 54 let dict5: dict<blob> = #{one: 0z01, tw: 0z02}
55 55
56 if has('channel') 56 if has('channel')
57 let chan1: channel 57 let chan1: channel
58 let job1: job
58 endif 59 endif
60 if has('float')
61 let float1: float = 3.4
62 endif
63 let party: partial = funcref('Test_syntax')
59 64
60 g:newvar = 'new' 65 g:newvar = 'new'
61 assert_equal('new', g:newvar) 66 assert_equal('new', g:newvar)
62 67
63 assert_equal('yes', g:existing) 68 assert_equal('yes', g:existing)