5f944e441c
Some checks failed
Build and Test with Maven / Build-and-test-with-Maven (push) Has been cancelled
15 lines
298 B
Java
15 lines
298 B
Java
import java.lang.Integer;
|
|
import java.lang.Object;
|
|
import java.lang.Float;
|
|
|
|
public record Rec(Object a, Object b) {}
|
|
|
|
public class SwitchInfered {
|
|
public main(o) {
|
|
return switch (o) {
|
|
case Rec(a, b) -> a + b;
|
|
case Integer i -> i;
|
|
default -> 0;
|
|
};
|
|
}
|
|
} |