Skip to content

Commit 0e7179c

Browse files
Simplify functional predicate implementation.
Co-authored-by: Anders Schack-Mulligen <[email protected]>
1 parent 9d34ce9 commit 0e7179c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

java/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,7 @@ private class Function extends ParameterizedType {
187187
* Holds if `callable` has a function parameter `f` at parameter position `position`.
188188
*/
189189
private predicate functional(Callable callable, Function f, int position) {
190-
exists(Parameter p |
191-
p = callable.getAParameter() and
192-
f = p.getType() and
193-
position = p.getPosition()
194-
)
190+
callable.getParameterType(position) = f
195191
}
196192

197193
/**

0 commit comments

Comments
 (0)