Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalFromUsage/beforeSwitchIntNull.java
Mikhail Pyltsin 938ed3204b [java-intentions] IDEA-313226. Suggest the correct type for switch
GitOrigin-RevId: bd99d2b31049b94542a1745f48a33d0ee787e83d
2023-02-17 18:39:18 +00:00

15 lines
271 B
Java

// "Create local variable 'x2'" "true-preview"
class A {
public void foo() {
var x = switch (x2<caret>)
{
case 1 ->
{
yield "bar";
}
case null -> "null";
default -> "foo";
};
}
}