Mercurial > vim
comparison src/eval.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 | e8e2c4d33b9b |
children | e7c02cbe701f |
comparison
equal
deleted
inserted
replaced
25424:3cf272d6ee04 | 25425:effe5f2b4d01 |
---|---|
3357 { | 3357 { |
3358 if (res == OK) | 3358 if (res == OK) |
3359 { | 3359 { |
3360 type_T *actual = typval2type(rettv, get_copyID(), &type_list, TRUE); | 3360 type_T *actual = typval2type(rettv, get_copyID(), &type_list, TRUE); |
3361 | 3361 |
3362 if (!equal_type(want_type, actual)) | 3362 if (!equal_type(want_type, actual, 0)) |
3363 { | 3363 { |
3364 if (want_type == &t_bool && actual != &t_bool | 3364 if (want_type == &t_bool && actual != &t_bool |
3365 && (actual->tt_flags & TTFLAG_BOOL_OK)) | 3365 && (actual->tt_flags & TTFLAG_BOOL_OK)) |
3366 { | 3366 { |
3367 int n = tv2bool(rettv); | 3367 int n = tv2bool(rettv); |