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