forked from aniani/vim
patch 9.0.1796: Vim9 problems with null_objects
Problem: Vim9 problems with null_objects Solution: Vim9 improve null_object usage Fix "xvar == null", where xvar might have been assigned null_object. Fix compilation failure: "var o2: C = null_object". closes: #12890 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Ernie Rael <errael@raelity.com>
This commit is contained in:
committed by
Christian Brabandt
parent
d4e4ecbb37
commit
5c018bee0e
@@ -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;
|
||||
|
Reference in New Issue
Block a user