Skip to content

Instantly share code, notes, and snippets.

@whaley
Created September 20, 2016 15:48
Show Gist options
  • Save whaley/161e66ab4ee2d85fd7e048e9c79e5a12 to your computer and use it in GitHub Desktop.
Save whaley/161e66ab4ee2d85fd7e048e9c79e5a12 to your computer and use it in GitHub Desktop.
public static void main(String[] outsideArgs) {
Test<Collection<Integer>, List<Integer>> t = test();
Collection<Integer> a = t.getA();
List<Integer> b = t.getB();
}
public static class Test<A, B> {
A getA() {
return null;
}
B getB() {
return null;
}
}
public static <U> Test<Collection<U>, List<U>> test() {
return new Test<Collection<U>, List<U>>() {
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment