Do not throw when expression type is unexpected
@@ -164,15 +164,23 @@ final class ExpressionVerifier
protected Boolean visitGenericLiteral(GenericLiteral actual, Expression expected)
{
+ if (expected instanceof GenericLiteral) {
return getValueFromLiteral(actual).equals(getValueFromLiteral(expected));
}
+ return false;
+ }
+
@Override
protected Boolean visitLongLiteral(LongLiteral actual, Expression expected)
{
+ if (expected instanceof LongLiteral) {
return getValueFromLiteral(actual).equals(getValueFromLiteral(expected));
}
+ return false;
+ }
+
@Override
protected Boolean visitDoubleLiteral(DoubleLiteral actual, Expression expected)
{
