// Test that an identifier's type can promote to a constant.
SymbolTable symbols = new HashSymbolTable();
symbols.addSymbol(new AssignedSymbol("x", Type.getPrimitive(Type.TypeName.INT), "x",
IdentifierExpr.AccessType.FIELD));
Expr binopExpr = new BinExpr(
new ConstExpr(Type.getPrimitive(Type.TypeName.BIGINT), Integer.valueOf(2)),
BinOp.Add, new IdentifierExpr("x"));
TypeChecker tc = new TypeChecker(symbols);
binopExpr.accept(tc);
}