import java.lang.Integer; import java.lang.Object; import java.lang.Float; import java.lang.String; public record Rec(String a, String b) {} public class test extends String{ } public class SwitchInfered { public main(o) { return switch (o) { case Rec(a, b) -> a; case Integer i -> i+1; default -> 0; }; } }