Mercurial > vim
comparison src/testdir/test_vim9_func.vim @ 28008:cc7d54a134e4 v8.2.4529
patch 8.2.4529: Vim9: comparing partial with function fails
Commit: https://github.com/vim/vim/commit/ed0c62e7b16b62655824df28cdd6bd75aadbb8fc
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Mar 8 19:43:55 2022 +0000
patch 8.2.4529: Vim9: comparing partial with function fails
Problem: Vim9: comparing partial with function fails.
Solution: Support this comparison. Avoid a crash. (closes https://github.com/vim/vim/issues/9909)
Add more test cases.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 08 Mar 2022 20:45:03 +0100 |
parents | 02f787034998 |
children | b10fa9b17c85 |
comparison
equal
deleted
inserted
replaced
28007:e11bea0167bb | 28008:cc7d54a134e4 |
---|---|
3339 | 3339 |
3340 def Test_partial_null_function() | 3340 def Test_partial_null_function() |
3341 var lines =<< trim END | 3341 var lines =<< trim END |
3342 var d: dict<func> = {f: null_function} | 3342 var d: dict<func> = {f: null_function} |
3343 var Ref = d.f | 3343 var Ref = d.f |
3344 assert_equal('func', typename(Ref)) | 3344 assert_equal('func(...): unknown', typename(Ref)) |
3345 END | 3345 END |
3346 v9.CheckDefAndScriptSuccess(lines) | 3346 v9.CheckDefAndScriptSuccess(lines) |
3347 enddef | 3347 enddef |
3348 | 3348 |
3349 " Using "idx" from a legacy global function does not work. | 3349 " Using "idx" from a legacy global function does not work. |