diff --git a/source/scope.c b/source/scope.c index e060747..d2f491a 100644 --- a/source/scope.c +++ b/source/scope.c @@ -33,6 +33,11 @@ static bool checkType(Literal typeLiteral, Literal value) { return false; } + //always allow null values + if (IS_NULL(value)) { + return true; + } + //for each type, if a mismatch is found, return false if (AS_TYPE(typeLiteral).typeOf == LITERAL_BOOLEAN && !IS_BOOLEAN(value)) { return false;