JavaCompilerCore/resources/bytecode/javFiles/OverloadNestedPattern.jav
Daniel Holle 443b8b0c09
Some checks failed
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 42s
Test nested record matching, thankfully switch does the heavy lifting, fixes #349
2024-11-20 13:17:10 +01:00

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;
}
}