Inspection bug?
Is this a bug? The following code compiles, but IDEA complains "Incovertible types; cannot cast 'int' to 'java.lang.Integer'. This also applies to other primitive types. There are times (since 1.5) when this kind of casting is required. Build #4192 on Windows XP.
public final class X {
void method() {
methodX((Integer)7);
}
void methodX(Integer i) {
}
void methodX(Object o) {
}
}
请先登录再写评论。