Mercurial > vim
diff 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 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -55,7 +55,12 @@ def Test_assignment() if has('channel') let chan1: channel + let job1: job endif + if has('float') + let float1: float = 3.4 + endif + let party: partial = funcref('Test_syntax') g:newvar = 'new' assert_equal('new', g:newvar)