Files
JavaCompilerCore/resources/bytecode/javFiles/PatternMatchingLiteralStyle.jav
2025-11-27 15:32:30 +01:00

18 lines
319 B
Java

import java.lang.Integer;
import java.lang.String;
public record R(String n) {}
public class SwitchOverload {
f() { return 10; }
g() { return 20; }
public m(r) {
return switch(r) {
case R("test") -> f();
case R("foo") -> g();
case R r -> 0;
};
}
}