Debian Codegraph @

framework/tests/all-systems/java8inference/Bug3.java

raw
1 package inference.guava;
2
3 import java.util.EnumSet;
4 import java.util.Set;
5
6 @SuppressWarnings("") // Just check for crashes.
7 public class Bug3 {
8
9 public abstract static class MySet<E> implements Set<E> {
10
11 public static <E> MySet<E> of() {
12 throw new RuntimeException("");
13 }
14
15 public static <E> MySet<E> of(E e) {
16 throw new RuntimeException("");
17 }
18 }
19
20 @SuppressWarnings({"rawtypes", "unchecked"})
21 static MySet asMySet(EnumSet set) {
22 return MySet.of(getElement(set));
23 }
24
25 public static <T> T getElement(Iterable<T> iterable) {
26 throw new RuntimeException();
27 }
28 }