20 lines
379 B
Plaintext
20 lines
379 B
Plaintext
|
import java.lang.Object;
|
||
|
import java.lang.Integer;
|
||
|
import java.lang.Float;
|
||
|
|
||
|
public record R(Object nested) {}
|
||
|
|
||
|
public class OverloadNestedPattern {
|
||
|
|
||
|
public Integer m(R(R(Integer a)), R(Integer b)) {
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
public Integer m(R(R(Float a)), R(Float b)) {
|
||
|
return 2;
|
||
|
}
|
||
|
|
||
|
public Integer m(R(Integer a), R(Integer b)) {
|
||
|
return 3;
|
||
|
}
|
||
|
}
|