2024-06-06 12:16:28 +02:00
|
|
|
import java.lang.Integer;
|
|
|
|
import java.lang.Object;
|
|
|
|
import java.lang.Float;
|
2024-07-25 08:27:43 +02:00
|
|
|
import java.lang.String;
|
|
|
|
|
|
|
|
public record Rec(String a, String b) {}
|
|
|
|
|
|
|
|
public class test extends String{
|
|
|
|
}
|
2024-06-06 12:16:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
public class SwitchInfered {
|
|
|
|
public main(o) {
|
|
|
|
return switch (o) {
|
2024-07-25 08:27:43 +02:00
|
|
|
case Rec(a, b) -> a;
|
|
|
|
case Integer i -> i+1;
|
2024-06-06 12:16:28 +02:00
|
|
|
default -> 0;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|