diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-07-09 19:53:57 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-09 19:53:57 +0200 |
commit | 9da32e4d578f4e93ef5397f9dd13e2c28b2a2595 (patch) | |
tree | 3b7fa35a186301c297576996f19e144519c34179 /src/testdir/test_vim9_builtin.vim | |
parent | 90fba5627b361dbc970b3afc2eebf7411c49a0cc (diff) |
patch 8.2.3134: crash when using typename() on a function referencev8.2.3134
Problem: Crash when using typename() on a function reference. (Naohiro Ono)
Solution: Initialize pointer to NULL. (closes #8531)
Diffstat (limited to 'src/testdir/test_vim9_builtin.vim')
-rw-r--r-- | src/testdir/test_vim9_builtin.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim index dcf60072f1..5964ded70c 100644 --- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -1943,6 +1943,12 @@ def Test_tr() CheckDefFailure(['echo tr("a", "a", 1)'], 'E1013: Argument 3: type mismatch, expected string but got number') enddef +def Test_typename() + if has('float') + assert_equal('func([unknown], [unknown]): float', typename(function('pow'))) + endif +enddef + def Test_undofile() CheckDefFailure(['undofile(10)'], 'E1013: Argument 1: type mismatch, expected string but got number') assert_equal('.abc.un~', fnamemodify(undofile('abc'), ':t')) |