Mercurial > vim
comparison src/vim9type.c @ 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 | 1012048eed26 |
children | 230115610b6a |
comparison
equal
deleted
inserted
replaced
28007:e11bea0167bb | 28008:cc7d54a134e4 |
---|---|
418 else | 418 else |
419 name = tv->vval.v_partial->pt_name; | 419 name = tv->vval.v_partial->pt_name; |
420 } | 420 } |
421 else | 421 else |
422 name = tv->vval.v_string; | 422 name = tv->vval.v_string; |
423 if (name == NULL && ufunc == NULL) | |
424 return &t_func_unknown; | |
423 if (name != NULL) | 425 if (name != NULL) |
424 { | 426 { |
425 int idx = find_internal_func(name); | 427 int idx = find_internal_func(name); |
426 | 428 |
427 if (idx >= 0) | 429 if (idx >= 0) |