Ruben 5f944e441c
Some checks failed
Build and Test with Maven / Build-and-test-with-Maven (push) Has been cancelled
feat: working with Integer-Values but not Strings.
2024-07-17 16:41:38 +02:00

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;
};
}
}