diff --git a/scripts/empty.toy b/scripts/empty.toy index 3766a55..b727c01 100644 --- a/scripts/empty.toy +++ b/scripts/empty.toy @@ -1,9 +1,5 @@ //BUG: this causes a strange error message -if (true) { - ; -} -else { - ; -} \ No newline at end of file +if (true); +else; diff --git a/source/literal.c b/source/literal.c index 1fddebc..8826e7f 100644 --- a/source/literal.c +++ b/source/literal.c @@ -381,7 +381,8 @@ bool literalsAreEqual(Literal lhs, Literal rhs) { } switch(lhs.type) { - //NOTE: null covered by check at the top of the function + case LITERAL_NULL: + return true; //can only be true because of the check above case LITERAL_BOOLEAN: return AS_BOOLEAN(lhs) == AS_BOOLEAN(rhs);