Skip to content

Commit

Permalink
Add passing test case for Issue 6636 (#6637)
Browse files Browse the repository at this point in the history
  • Loading branch information
smillst authored May 31, 2024
1 parent 7910bf5 commit d99bae2
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions framework/tests/all-systems/java21/Issue6636.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// @below-java21-jdk-skip-test

// None of the WPI formats supports the new Java 21 languages features, so skip inference until they
// do.
// @infer-jaifs-skip-test
// @infer-ajava-skip-test
// @infer-stubs-skip-test

import java.util.function.Function;

public class Issue6636 {
interface Decorator {
<In, Out> Function<In, Out> decorate(Function<? super In, ? extends Out> target);
}

interface Targets {
<In, Out> Function<In, Out> get(Class<In> in, Class<Out> out);
}

record Request() {}

record Response() {}

public Response call(Decorator decorator, Targets targets, Request request) {
return decorator.decorate(targets.get(Request.class, Response.class)).apply(request);
}
}

0 comments on commit d99bae2

Please sign in to comment.