Simplify functional predicate implementation.

Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
This commit is contained in:
Michael Nebel
2022-11-07 10:51:04 +01:00
parent 9d34ce9776
commit 0e7179ca85

View File

@@ -187,11 +187,7 @@ private class Function extends ParameterizedType {
* Holds if `callable` has a function parameter `f` at parameter position `position`.
*/
private predicate functional(Callable callable, Function f, int position) {
exists(Parameter p |
p = callable.getAParameter() and
f = p.getType() and
position = p.getPosition()
)
callable.getParameterType(position) = f
}
/**