| 1 |
// Test case for Issue 1312. |
| 2 |
// https://github.com/typetools/checker-framework/issues/1312 |
| 3 |
|
| 4 |
import java.util.*; |
| 5 |
import java.util.function.*; |
| 6 |
import java.util.stream.*; |
| 7 |
|
| 8 |
class SimpleEntry1312<K, V> { |
| 9 |
SimpleEntry1312(K k, V v) {} |
| 10 |
} |
| 11 |
|
| 12 |
@SuppressWarnings("") // check for crashes |
| 13 |
class Issue1312 { |
| 14 |
Map<SimpleEntry1312, List<SimpleEntry1312>> x = |
| 15 |
Stream.of(Stream.of(new SimpleEntry1312<>("A", "B"))) |
| 16 |
.flatMap(Function.identity()) |
| 17 |
.collect(Collectors.groupingBy(e -> e)); |
| 18 |
} |