Daniel Holle
443b8b0c09
Some checks failed
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 42s
20 lines
379 B
Java
20 lines
379 B
Java
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;
|
|
}
|
|
} |