[java-intentions] Do not suggest to add a cast to new expression (except) upcast

Part of IDEA-356767

GitOrigin-RevId: e9f9e6c1a46ade85c14f20811444299e8aff0c17
This commit is contained in:
Tagir Valeev
2024-07-26 09:49:18 +02:00
committed by intellij-monorepo-bot
parent d2cf90784f
commit 1fe9c2e631
3 changed files with 20 additions and 4 deletions

View File

@@ -0,0 +1,11 @@
// "Cast expression to 'Scratch.Y'" "false"
class Scratch {
public static class X { }
public static class Y extends X { }
public static void main(String[] args) {
Y y = new <caret>X();
}
}