Spot the bug in the wildcard copy method

from Wildcards and PECS
Java 25 LTS intermediate 4 min 1 issue to find

Find why this generated copy method cannot compile.

Java
import java.util.List;

public class GeneratedCopy {
    static <T> void copy(
            List<? extends T> destination,
            List<? super T> source) {
        destination.add(source.getFirst());
    }
}
Open in playground
Report an error