| 1 |
package inference.guava; |
| 2 |
|
| 3 |
import java.util.Spliterator; |
| 4 |
import java.util.stream.Stream; |
| 5 |
|
| 6 |
@SuppressWarnings("") // Just check for crashes. |
| 7 |
public class Bug13 { |
| 8 |
|
| 9 |
public static class MyClass<X> extends MySuperClass<X> { |
| 10 |
static <Z> Stream<Z> stream(MyClass<Z> s, Iterable<Z> iterable) { |
| 11 |
throw new RuntimeException(); |
| 12 |
} |
| 13 |
|
| 14 |
public void method(final Iterable<X> iterable) { |
| 15 |
Spliterator<X> x = Stream.generate(() -> iterable).flatMap(super::stream).spliterator(); |
| 16 |
} |
| 17 |
} |
| 18 |
|
| 19 |
public static class MySuperClass<Z> { |
| 20 |
Stream<Z> stream(Iterable<Z> iterable) { |
| 21 |
throw new RuntimeException(); |
| 22 |
} |
| 23 |
|
| 24 |
static <Z> Stream<Z> stream(MySuperClass<Z> s, Iterable<Z> iterable) { |
| 25 |
throw new RuntimeException(); |
| 26 |
} |
| 27 |
} |
| 28 |
|
| 29 |
public static <Q> void method(final Iterable<Q> iterable, MyClass<Q> myClass) { |
| 30 |
Spliterator<Q> x = Stream.generate(() -> iterable).flatMap(myClass::stream).spliterator(); |
| 31 |
} |
| 32 |
|
| 33 |
public static <Z> Stream<Z> stream(Iterable<Z> iterable) { |
| 34 |
throw new RuntimeException(); |
| 35 |
} |
| 36 |
} |