Skip to content

Low-priority main-eisop: [type.invalid.super.wildcard] bounds must have the same annotations. #162

@cpovirk

Description

@cpovirk

I've seen this error exactly once for this line in TreeRangeMap.

TreeRangeMap.java:438: error: [type.invalid.super.wildcard] bounds must have the same annotations.
            BiFunction<? super Object, ? super @Nullable Object, ? extends @Nullable Object>
                       ^
  super bound  : Object?
  extends bound: Object

I have some memory that javac makes it impossible to represent a type like "upper bound of @Nullable Object, lower bound of @NonNull Object." Like, it collapses it down to just Object or to just ? or something?? I can't remember, even though I thought I might have filed an issue against typetools about this, which might have contributed to the error above? [edit: now discussed here]

Again, this is low-priority, since it comes up extremely rarely. I'm just filing the issue so that I can check it off my list. We will have bigger issues to look at before this one :)

Metadata

Metadata

Assignees

No one assigned

    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