Skip to content

Instantly share code, notes, and snippets.

@taku0
Last active February 15, 2016 05:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taku0/a13eb529934aacd73dd4 to your computer and use it in GitHub Desktop.
Save taku0/a13eb529934aacd73dd4 to your computer and use it in GitHub Desktop.
interface A {
}
interface B {
}
interface C {
}
// ERROR
class Foo1 {
public <T extends A & B> void foo(T x) {
}
public <T extends B & A> void foo(T x) {
}
}
// OK
class Foo2 {
public <T extends A & B> void foo(T x) {
}
public <T extends B> void foo(T x) {
}
}
// ERROR
class Foo3 {
public <T extends A & B> void foo(T x) {
}
public <T extends A> void foo(T x) {
}
}
// OK
class Foo4 {
public <T extends A & B> void foo(T x) {
}
public <T extends B & A & C> void foo(T x) {
}
}
// ERROR
class Foo5 {
public <T extends A & B & C> void foo(T x) {
}
public <T extends B & A & C> void foo(T x) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment