return arg;
}
if (arg instanceof JValueLiteral && targetType instanceof JPrimitiveType) {
// Attempt to coerce the literal.
JPrimitiveType primitiveType = (JPrimitiveType) targetType;
JValueLiteral coerced = primitiveType.coerceLiteral((JValueLiteral) arg);
if (coerced != null) {
return coerced;
}
}
// Synthesize a cast to long to force explicit conversion.