mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
redundant cast: do not mark casts to raw types redundant (IDEA-71419)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
@@ -9,3 +10,12 @@ public class Main {
|
||||
System.out.println(map);
|
||||
}
|
||||
}
|
||||
|
||||
interface I {}
|
||||
class C implements I {}
|
||||
class U {
|
||||
void foo() {
|
||||
List<C> listOfC = null;
|
||||
List<I> listOfI = (List) listOfC;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -447,6 +447,8 @@ public class RedundantCastUtil {
|
||||
}
|
||||
else if (castType instanceof PsiClassType && ((PsiClassType)castType).hasParameters()) {
|
||||
if (opType instanceof PsiClassType && ((PsiClassType)opType).isRaw()) return true;
|
||||
} else if (castType instanceof PsiClassType && ((PsiClassType)castType).isRaw()) {
|
||||
if (opType instanceof PsiClassType && ((PsiClassType)opType).hasParameters()) return true;
|
||||
}
|
||||
|
||||
PsiElement parent = typeCast.getParent();
|
||||
|
||||
Reference in New Issue
Block a user