Skip to content

New errors (maybe related to ? super) from eisop/checker-framework#746 #193

Closed
@cpovirk

Description

@cpovirk

Using the command given here to test with main-eisop:

/tmp/tmp.OBavpODHqE/guava/guava/src/com/google/common/collect/Multisets.java:1123: error: [argument.type.incompatible] incompatible argument for parameter o of Collections.nCopies.
        entry -> Collections.nCopies(entry.getCount(), entry.getElement()).spliterator(),
                                                                       ^
  found   : E*
  required: E

E* should be a valid substitute for E in lenient mode.

/tmp/tmp.OBavpODHqE/guava/guava/src/com/google/common/collect/TreeMultimap.java:224: error: [assignment.type.incompatible] incompatible types in assignment.
    keyComparator = requireNonNull((Comparator<? super K>) stream.readObject());
                                  ^
  found   : Comparator<capture#767 of ? super K>
  required: Comparator<? super K>

I'm not totally sure what's up with that one, nor even that these two errors are closely related.

Previous discussions (which also touched on the problem that SequencedCollection and friends are unannotated):

I have promised to try to produce a smaller repro of this problem. For now, I'm filing this issue as a placeholder.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions