| 1 |
// Test case for Issue 1697: |
| 2 |
// https://github.com/typetools/checker-framework/issues/1697 |
| 3 |
|
| 4 |
class Issue1697 { |
| 5 |
|
| 6 |
interface G<A> { |
| 7 |
A h(byte[] l); |
| 8 |
} |
| 9 |
|
| 10 |
interface F {} |
| 11 |
|
| 12 |
interface E extends F { |
| 13 |
interface M extends F {} |
| 14 |
} |
| 15 |
|
| 16 |
abstract static class D<A extends D<A, B>, B extends D.M<A, B>> implements E { |
| 17 |
abstract static class M<A extends D<A, B>, B extends M<A, B>> implements E.M {} |
| 18 |
} |
| 19 |
|
| 20 |
abstract static class C<A extends C<A, B>, B extends C.M<A, B>> extends D<A, B> { |
| 21 |
abstract static class M<A extends C<A, B>, B extends M<A, B>> extends D.M<A, B> {} |
| 22 |
} |
| 23 |
|
| 24 |
static class W<T extends C<T, ?>> { |
| 25 |
private W(T proto) {} |
| 26 |
} |
| 27 |
|
| 28 |
<T extends C<T, ?>> W<T> i(G<T> j, byte[] k) { |
| 29 |
return new W<>(j.h(k)); |
| 30 |
} |
| 31 |
} |