package inference.guava; import java.util.EnumSet; import java.util.Set; @SuppressWarnings("") // Just check for crashes. public class Bug3 { public abstract static class MySet implements Set { public static MySet of() { throw new RuntimeException(""); } public static MySet of(E e) { throw new RuntimeException(""); } } @SuppressWarnings({"rawtypes", "unchecked"}) static MySet asMySet(EnumSet set) { return MySet.of(getElement(set)); } public static T getElement(Iterable iterable) { throw new RuntimeException(); } }