summaryrefslogtreecommitdiffstats
path: root/src/vim9type.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vim9type.c')
-rw-r--r--src/vim9type.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vim9type.c b/src/vim9type.c
index 95252dbafe..0dd74ee184 100644
--- a/src/vim9type.c
+++ b/src/vim9type.c
@@ -970,7 +970,10 @@ check_argument_types(
}
else
expected = type->tt_args[i];
- if (check_typval_arg_type(expected, tv, NULL, i + 1) == FAIL)
+
+ // check the type, unless the value is v:none
+ if ((tv->v_type != VAR_SPECIAL || tv->vval.v_number != VVAL_NONE)
+ && check_typval_arg_type(expected, tv, NULL, i + 1) == FAIL)
return FAIL;
}
return OK;