mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-05 21:00:59 +07:00
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only) GitOrigin-RevId: 1e1b77009dc78de49c7cc5c44d4704937397bb23
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) {
|
|
int i1 = <error descr="Incompatible types. Found: 'T', required: 'int'">i</error>; //report
|
|
return i1;
|
|
}
|
|
} |