Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalFromUsage/afterSwitchString.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
258 B
Java

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