codeql icon indicating copy to clipboard operation
codeql copied to clipboard

Java: Add test showing missing dispatch for incomplete parameterised type

Open aschackmull opened this issue 8 months ago • 1 comments

Cf. https://github.com/github/codeql/issues/19538

The test is failing for a couple of reasons. The most important is that MethodCall.getMethod() has no results for the call, i.e. the extractor has not populated callableBinding. It's unclear what exactly we'd want the target callable to be, but it's clear what its getSourceDeclaration() should be and that's what we really need. If we fix that somehow, then we'll also need to allow ErrorType in Unification.qll, but for now that won't do anything.

aschackmull avatar May 20 '25 15:05 aschackmull

Suggest trying resolving this by https://github.com/github/semmle-code/tree/smowton/wip/fix-missing-methods

That fixes the database inconsistency so MethodCall.getCallee works, but it is not picked up by viableCallable yet.

smowton avatar May 21 '25 11:05 smowton