Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type inference crashed: AsSuperVisitor: unexpected combination #6874

Open
theosotr opened this issue Oct 25, 2024 · 0 comments
Open

type inference crashed: AsSuperVisitor: unexpected combination #6874

theosotr opened this issue Oct 25, 2024 · 0 comments
Assignees
Labels

Comments

@theosotr
Copy link

Command

javac -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
  -J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
  -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
  -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
  -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED \
  -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
  -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
  -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
  -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
-processor org.checkerframework.checker.nullness.NullnessChecker \
-nowarn -cp checker-framework/checker/dist/checker.jar -Aignorejdkastub Test.java

File

import java.util.*;

public class Test {
  static public void test(Comparator<Map[]> x,
                          Collection<Map[]> y,
                          Collection<? extends Map[]> z) {
      java.util.Collections.min((true) ? y: z, x);
  }
}

Actual behavior

Test.java:7: error: [type.argument.inference.crashed] Type argument inference crashed for Collections.min
      java.util.Collections.min((true) ? y: z, x);
                               ^
  error: An exception occurred: AsSuperVisitor: unexpected combination:  type: [TYPEVAR class org.checkerframework.framework.type.AnnotatedTypeMirror$AnnotatedTypeVariable] capture#01 extends Map</*RAW*/> []  supertype: [ARRAY class org.checkerframework.framework.type.AnnotatedTypeMirror$AnnotatedArrayType] Map</*Type args not initialized*/>[]
Test.java:7: error: [type.argument.inference.crashed] Type argument inference crashed for Collections.min
      java.util.Collections.min((true) ? y: z, x);
                               ^
  error: An exception occurred: AsSuperVisitor: unexpected combination:  type: [TYPEVAR class org.checkerframework.framework.type.AnnotatedTypeMirror$AnnotatedTypeVariable] capture#01 extends @Initialized @NonNull Map</*RAW*/> @Initialized @NonNull []  supertype: [ARRAY class org.checkerframework.framework.type.AnnotatedTypeMirror$AnnotatedArrayType] Map</*Type args not initialized*/>[]
2 errors
@smillst smillst self-assigned this Oct 29, 2024
@smillst smillst added the crash label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants