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

Crash in AnnotatedTypes.annotatedGLB: intersection bounds #4877

Closed
cushon opened this issue Aug 10, 2021 · 0 comments · Fixed by #4888
Closed

Crash in AnnotatedTypes.annotatedGLB: intersection bounds #4877

cushon opened this issue Aug 10, 2021 · 0 comments · Fixed by #4888
Assignees
Labels

Comments

@cushon
Copy link
Contributor

cushon commented Aug 10, 2021

This reproduces at head with #4866 and #4875 patched in:

interface N<T extends N<T>> {}

interface O<T extends N<T>> {}

interface X {}

class Q<M extends N<M> & X> {}

final class P<T extends N<T>> implements O<T> {
  Q<? extends T> f;
}
$ ./checker/bin/javac -processor Nullness X.java
error: Neither N<capture#241 extends T extends N<T extends N<T>> & X> & X nor T extends N<T> is one of the intersection bounds in N. Bound: T & N & X
  ; The Checker Framework crashed.  Please report the crash.
  Compilation unit: X.java
  Last visited tree at line 10 column 3:
    Q<? extends T> f;
  Exception: java.lang.Throwable; java.lang.Throwable
        at org.checkerframework.javacutil.BugInCF.<init>(BugInCF.java:34)
        at org.checkerframework.framework.util.AnnotatedTypes.annotatedGLB(AnnotatedTypes.java:838)
        at org.checkerframework.framework.type.AnnotatedTypeFactory.annotateCapturedTypeVar(AnnotatedTypeFactory.java:5063)
        at org.checkerframework.framework.type.AnnotatedTypeFactory.applyCaptureConversion(AnnotatedTypeFactory.java:4883)
        at org.checkerframework.framework.type.AnnotatedTypeFactory.applyCaptureConversion(AnnotatedTypeFactory.java:4774)
        at org.checkerframework.common.basetype.BaseTypeValidator.visitParameterizedType(BaseTypeValidator.java:549)
        at org.checkerframework.common.basetype.BaseTypeValidator.visitDeclared(BaseTypeValidator.java:334)
        at org.checkerframework.common.basetype.BaseTypeValidator.visitDeclared(BaseTypeValidator.java:57)
        at org.checkerframework.framework.type.AnnotatedTypeMirror$AnnotatedDeclaredType.accept(AnnotatedTypeMirror.java:955)
        at org.checkerframework.framework.type.visitor.AnnotatedTypeScanner.scan(AnnotatedTypeScanner.java:206)
        at org.checkerframework.framework.type.visitor.AnnotatedTypeScanner.visit(AnnotatedTypeScanner.j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants