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 — Type argument inference crashed · Issue #7702 · typetools/checker-framework

Type argument inference crashed #7702

New issue
Copy link
New issue
Copy link
Closed
#7965
Closed
Type argument inference crashed#7702
#7965
Copy link

Description

@cushon
cushon
opened on May 4, 2026
Issue body actions
$ cat CrashRepro.java
import java.lang.invoke.MethodHandle;

public class CrashRepro {
  interface Foo {
    <T extends Bar> T passthru(T t);
  }

  interface Bar {}

  void run(MethodHandle handle, Object o, Foo foo, Bar bar) throws Throwable {
    handle.invokeExact(o, foo.passthru(bar));
  }
}
$ ~/checker-framework-4.0.0/checker/bin/javac -processor nullness CrashRepro.java
CrashRepro.java:11: error: [type.argument.inference.crashed] Type argument inference crashed for Foo.passthru
    handle.invokeExact(o, foo.passthru(bar));
                                      ^
  error: An exception occurred: class com.sun.tools.javac.code.Type$ClassType cannot be cast to class javax.lang.model.type.ArrayType (com.sun.tools.javac.code.Type$ClassType is in module jdk.compiler of loader 'app'; javax.lang.model.type.ArrayType is in module java.compiler of loader 'platform')
CrashRepro.java:11: error: [type.argument.inference.crashed] Type argument inference crashed for Foo.passthru
    handle.invokeExact(o, foo.passthru(bar));
                                      ^
  error: An exception occurred: class com.sun.tools.javac.code.Type$ClassType cannot be cast to class javax.lang.model.type.ArrayType (com.sun.tools.javac.code.Type$ClassType is in module jdk.compiler of loader 'app'; javax.lang.model.type.ArrayType is in module java.compiler of loader 'platform')
2 errors

Or, if the o argument is removed from the call to invokeExact:

$ ~/checker-framework-4.0.0/checker/bin/javac -processor nullness CrashRepro.java
CrashRepro.java:11: error: [type.argument.inference.crashed] Type argument inference crashed for Foo.passthru
    handle.invokeExact(foo.passthru(bar));
                                   ^
  error: An exception occurred:  False bound for: Constraint: Bar <: Object [] Result: FALSE
  Bar <: Object []
  use of T from foo.passthru(bar) <: Object []
  From complementary bound.: use of T from foo.passthru(bar) -> Object []
  From: Constraint between method call type and target type for method call:foo.passthru(bar)
CrashRepro.java:11: error: [type.argument.inference.crashed] Type argument inference crashed for Foo.passthru
    handle.invokeExact(foo.passthru(bar));
                                   ^
  error: An exception occurred:  False bound for: Constraint: @Initialized @NonNull Bar <: @Initialized @NonNull Object @Initialized @NonNull [] Result: FALSE
  @Initialized @NonNull Bar <: @Initialized @NonNull Object @Initialized @NonNull []
  use of T from foo.passthru(bar) <: @Initialized @NonNull Object @Initialized @NonNull []
  From complementary bound.: use of T from foo.passthru(bar) -> @Initialized @NonNull Object @Initialized @NonNull []
  From: Constraint between method call type and target type for method call:foo.passthru(bar)
2 errors

Activity

  1. smillst
    linked a pull request that will close this issueAdd now passing tests. #7965on Aug 18, 2026
  2. smillst commented on Aug 18, 2026

    @smillst
    smillst
    on Aug 18, 2026
    Member
    More actions

    Fixed via #7965

  3. smillst
    closed this as completedon Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      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.