Mercurial > vim
comparison src/vim9script.c @ 25425:effe5f2b4d01 v8.2.3249
patch 8.2.3249: Vim9: error for re-imported function with default argument
Commit: https://github.com/vim/vim/commit/60dc8274e9f8c6a20d54efebc7a8752fe062eead
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 29 22:48:54 2021 +0200
patch 8.2.3249: Vim9: error for re-imported function with default argument
Problem: Vim9: error for re-imported function with default argument.
Solution: Do not check argument type if it is still unknown. (closes https://github.com/vim/vim/issues/8653)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 29 Jul 2021 23:00:04 +0200 |
parents | 3e56078569ca |
children | 2063b858cad9 |
comparison
equal
deleted
inserted
replaced
25424:3cf272d6ee04 | 25425:effe5f2b4d01 |
---|---|
621 imported = find_imported(name, len, cctx); | 621 imported = find_imported(name, len, cctx); |
622 if (imported != NULL | 622 if (imported != NULL |
623 && (imported->imp_flags & IMP_FLAGS_RELOAD) | 623 && (imported->imp_flags & IMP_FLAGS_RELOAD) |
624 && imported->imp_sid == sid | 624 && imported->imp_sid == sid |
625 && (idx >= 0 | 625 && (idx >= 0 |
626 ? (equal_type(imported->imp_type, type) | 626 ? (equal_type(imported->imp_type, type, 0) |
627 && imported->imp_var_vals_idx == idx) | 627 && imported->imp_var_vals_idx == idx) |
628 : (equal_type(imported->imp_type, ufunc->uf_func_type) | 628 : (equal_type(imported->imp_type, ufunc->uf_func_type, |
629 ETYPE_ARG_UNKNOWN) | |
629 && STRCMP(imported->imp_funcname, | 630 && STRCMP(imported->imp_funcname, |
630 ufunc->uf_name) == 0))) | 631 ufunc->uf_name) == 0))) |
631 { | 632 { |
632 imported->imp_flags &= ~IMP_FLAGS_RELOAD; | 633 imported->imp_flags &= ~IMP_FLAGS_RELOAD; |
633 } | 634 } |