17 lines
279 B
Plaintext
17 lines
279 B
Plaintext
|
import java.lang.Integer;
|
||
|
import java.lang.Double;
|
||
|
import java.lang.Number;
|
||
|
import java.lang.String;
|
||
|
|
||
|
public record R(Number n) {}
|
||
|
|
||
|
public class SwitchOverload {
|
||
|
|
||
|
public f(){}
|
||
|
|
||
|
public m(r) {
|
||
|
return switch(r) {
|
||
|
case R("test") -> f();
|
||
|
};
|
||
|
}
|
||
|
}
|