From e117659dce164ade9865036f1b5a8e0de9e5ab3a Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Mon, 25 Oct 2021 20:50:18 +0200 Subject: [PATCH] revert a thing for python --- python/ql/lib/semmle/python/objects/ObjectAPI.qll | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/python/ql/lib/semmle/python/objects/ObjectAPI.qll b/python/ql/lib/semmle/python/objects/ObjectAPI.qll index c01650e6da7..d3082d26130 100644 --- a/python/ql/lib/semmle/python/objects/ObjectAPI.qll +++ b/python/ql/lib/semmle/python/objects/ObjectAPI.qll @@ -343,21 +343,25 @@ module Value { * Callables include Python functions, built-in functions and bound-methods, * but not classes. */ -class CallableValue extends Value instanceof CallableObjectInternal { +class CallableValue extends Value { + CallableValue() { this instanceof CallableObjectInternal } + /** * Holds if this callable never returns once called. * For example, `sys.exit` */ - predicate neverReturns() { super.neverReturns() } + predicate neverReturns() { this.(CallableObjectInternal).neverReturns() } /** Gets the scope for this function, provided that it is a Python function. */ FunctionScope getScope() { result = this.(PythonFunctionObjectInternal).getScope() } /** Gets the `n`th parameter node of this callable. */ - NameNode getParameter(int n) { result = super.getParameter(n) } + NameNode getParameter(int n) { result = this.(CallableObjectInternal).getParameter(n) } /** Gets the `name`d parameter node of this callable. */ - NameNode getParameterByName(string name) { result = super.getParameterByName(name) } + NameNode getParameterByName(string name) { + result = this.(CallableObjectInternal).getParameterByName(name) + } /** * Gets the argument in `call` corresponding to the `n`'th positional parameter of this callable.