@return true if exp can hold int values. Note that expressions of some primitive types other than int, whose computational type is int, can also hold int values. @see PrimitiveType#asInt()
(Exp exp)
| 47 | * @see PrimitiveType#asInt() |
| 48 | */ |
| 49 | public static boolean holdsInt(Exp exp) { |
| 50 | return exp.getType() instanceof PrimitiveType t && t.asInt(); |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * @return {@code true} if {@code exp} can hold long values. |
no test coverage detected