GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Cannot infer type arguments · Issue #7364 · typetools/checker-framework

Cannot infer type arguments #7364

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
Cannot infer type arguments#7364
Copy link
Assignees
smillst

Description

@jpschewe
jpschewe
opened on Nov 7, 2025
Issue body actions

Checker version 3.52.0.
Java version: 21.0.8

To reproduce:

  1. mkdir -p net/mtu/eggplant/checker/
  2. cd net/mtu/eggplant/checker/
  3. tar -xzf type_arguments.tar.gz

Build this with checker. Result is

/home/jpschewe/projects/checker-bugs/src/main/java/net/mtu/eggplant/checker/type_arguments/Test.java:16: error: [type.arguments.not.inferred] Could not infer type arguments for Predicate.not
                                                   .filter(Predicate.not(AbstractGoal::isComputed)) //
                                                                        ^
  unsatisfiable constraint: @Initialized @PolyNull AbstractGoal <: @Initialized @NonNull AbstractGoal
  @Initialized @PolyNull AbstractGoal <: use of T from Predicate.not(AbstractGoal::isComputed)
  From complementary bound.: use of T from Predicate.not(AbstractGoal::isComputed) <= ? extends @Initialized @Nullable Object super @Initialized @PolyNull AbstractGoal
  inference type: java.util.function.Predicate<T> <: @Initialized @NonNull Predicate<? extends @Initialized @Nullable Object super @Initialized @PolyNull AbstractGoal>
  inference type: java.util.function.Predicate<T> -> @Initialized @NonNull Predicate<? extends @Initialized @Nullable Object super @Initialized @PolyNull AbstractGoal>
  From: Constraint between method call type and target type for method call:Predicate.not(AbstractGoal::isComputed)
/home/jpschewe/projects/checker-bugs/src/main/java/net/mtu/eggplant/checker/type_arguments/Test.java:18: error: [methodref.receiver] Incompatible receiver type
                                                   .anyMatch(Goal::isRequired);
                                                             ^
  found   : @Initialized @NonNull Goal
  required: @Initialized @PolyNull Goal
  Consequence: method in @Initialized @NonNull Goal
    @Initialized @NonNull boolean isRequired(@Initialized @NonNull Goal this)
  is not a valid method reference for method in @Initialized @NonNull Predicate<@Initialized @PolyNull Goal>
    @Initialized @NonNull boolean test(@Initialized @NonNull Predicate<@Initialized @PolyNull Goal> this, @Initialized @PolyNull Goal p0)
2 errors

Activity

  1. jpschewe commented on Nov 7, 2025

    @jpschewe
    jpschewe
    on Nov 7, 2025
    Author
    More actions

    This works with checker 3.42.0.

  2. jpschewe
    added a commit that references this issue on Nov 7, 2025

    Test files

    b1078eb
  3. jpschewe commented on Nov 7, 2025

    @jpschewe
    jpschewe
    on Nov 7, 2025
    Author
    More actions

    Alternative to test

    1. git clone https://github.com/jpschewe/checker-bugs.git
    2. git checkout cannot-infer-type-arguments
    3. ./gradlew classes
  4. mernst
    assigned
    smillst
    on Jan 17, 2026
  5. smillst
    closed this as a duplicateof Problems inferring arguments from stream pipelines #6938 on Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @smillst
    smillst

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.