summaryrefslogtreecommitdiffstats
path: root/src/vim9type.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vim9type.c')
-rw-r--r--src/vim9type.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vim9type.c b/src/vim9type.c
index c42e4f4931..3955ce2f65 100644
--- a/src/vim9type.c
+++ b/src/vim9type.c
@@ -907,6 +907,8 @@ check_type_maybe(
return MAYBE; // use runtime type check
if (actual->tt_type != VAR_OBJECT)
return FAIL; // don't use tt_class
+ if (actual->tt_class == NULL)
+ return OK; // A null object matches
if (class_instance_of(actual->tt_class, expected->tt_class) == FALSE)
ret = FAIL;