mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
20 lines
608 B
Java
20 lines
608 B
Java
public class CastUnboxingConversionWithWidening {
|
|
static <T extends Integer> double boundIntegerToDoublePrimitive1(T i) {
|
|
return (double) i; //no report
|
|
}
|
|
|
|
static <T extends Integer> double boundIntegerToDoublePrimitive2(T i) {
|
|
double i1 = i; //no report
|
|
return i1;
|
|
}
|
|
|
|
static <T extends Integer> double boundIntegerToDoublePrimitive3(T i) {
|
|
double i1 = (double) i; //no report
|
|
return i1;
|
|
}
|
|
|
|
static <T extends Double> int boundDoubleToIntegerPrimitive(T i) {
|
|
<error descr="Incompatible types. Found: 'T', required: 'int'">int i1 = i;</error> //report
|
|
return i1;
|
|
}
|
|
} |