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.argument.inference.crashed error with method reference #6769

Closed
msridhar opened this issue Aug 26, 2024 · 0 comments · Fixed by #6822
Closed

type.argument.inference.crashed error with method reference #6769

msridhar opened this issue Aug 26, 2024 · 0 comments · Fixed by #6822
Assignees
Labels

Comments

@msridhar
Copy link
Contributor

Input:

import java.util.*;
import java.util.stream.*;
abstract class BlockTest {
  Set<BasicBlock<?>> iteratedBlocks;
  String test() {
    Collection<? extends BasicBlock<?>> blocks = getBlocks();
    return blocks.stream()
        .filter(n -> !iteratedBlocks.contains(n))
        .map(BasicBlock::getStmts)
        .collect(Collectors.toList())
        .toString();
  }
  interface BasicBlock<V extends BasicBlock<V>> {
    List<Stmt> getStmts();
  }
  interface Stmt {}
  abstract Collection<? extends BasicBlock<?>> getBlocks();
}

I get a type.argument.inference.crashed error with the Tainting Checker:

$ checker-framework/checker/bin/javac -processor tainting BlockTest.java
BlockTest.java:12: error: [type.argument.inference.crashed] Type argument inference crashed for BasicBlock.getStmts
                  .map(BasicBlock::getStmts)
                       ^
  error: An exception occurred:  False bound for: Constraint: ? extends @Tainted Object <= use of a2 Result: FALSE
1 error

We see a similar error with the Resource Leak Checker.

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