Merge pull request #6313 from aschackmull/java/fix-csv-dispatch

Java: Fix a bug in call-context-sensitve dispatch to SummarizedCallable.
This commit is contained in:
Anders Schack-Mulligen
2021-07-19 12:49:31 +02:00
committed by GitHub

View File

@@ -101,7 +101,7 @@ private module DispatchImpl {
* restricted to those `ma`s for which a context might make a difference.
*/
Method viableImplInCallContext(MethodAccess ma, Call ctx) {
result = VirtualDispatch::viableImpl(ma) and
result = viableCallable(ma) and
exists(int i, Callable c, Method def, RefType t, boolean exact |
mayBenefitFromCallContext(ma, c, i) and
c = viableCallable(ctx) and
@@ -115,6 +115,8 @@ private module DispatchImpl {
result = VirtualDispatch::viableMethodImpl(def, t.getSourceDeclaration(), t2) and
not failsUnification(t, t2)
)
or
result = def and def instanceof SummarizedCallable
)
}