0

I am trying to follow these steps.

And I have a problem on "make project" step:

invalid inferred types for T,A; inferred type does not conform to declared bound(s)
inferred: java.lang.Object
bound(s): T

in ("return addAll(newHashSet(items));")

@NotNull
public static <T> Set<T> set(@NotNull T ... items) {
  return addAll(newHashSet(items));
}

@NotNull
public static <T, A extends T, C extends Collection<T>> C addAll(@NotNull C collection, @NotNull A... elements) {
  //noinspection ManualArrayToCollectionCopy
  for (T element : elements) {
    collection.add(element);
  }
  return collection;
}

It seems strange - the source code is actual and I think, it could be a problem in Project Configuration. Any ideas?

1 Answers1

0

More info would be helpful. Like which java you are running? Your environment setting listed out.

java_dude
  • 4,038
  • 9
  • 36
  • 61