// can't add INT and TIMESTAMP.
Expr binopExpr = new BinExpr(
new ConstExpr(Type.getPrimitive(Type.TypeName.INT), Integer.valueOf(2)),
BinOp.Add, new ConstExpr(Type.getPrimitive(Type.TypeName.TIMESTAMP), Integer.valueOf(3)));
TypeChecker tc = new TypeChecker(new HashSymbolTable());
binopExpr.accept(tc);
}
@Test(expectedExceptions = VisitException.class)
public void testNestedBinopFail() throws VisitException {
// can't add INT and TIMESTAMP in a subexpr.