Python: Ignore .isAbsent() from ClassCall

This means that DataFlowCall is only for resolvable calls, which might not seem
like a big thing in itself, but enables the next commit to actually work :P
This commit is contained in:
Rasmus Wriedt Larsen
2022-02-03 01:41:53 +01:00
parent a5c2341204
commit 5cd08b8e8c
2 changed files with 2 additions and 2 deletions

View File

@@ -704,7 +704,7 @@ newtype TDataFlowCall =
TFunctionCall(CallNode call) { call = any(FunctionValue f).getAFunctionCall() } or
/** Bound methods need to make room for the explicit self parameter */
TMethodCall(CallNode call) { call = any(FunctionValue f).getAMethodCall() } or
TClassCall(CallNode call) { call = any(ClassValue c).getACall() } or
TClassCall(CallNode call) { call = any(ClassValue c | not c.isAbsent()).getACall() } or
TSpecialCall(SpecialMethodCallNode special)
/** Represents a call. */

View File

@@ -31,7 +31,7 @@ try:
# `mypkg.foo` is a `missing module variable`, but `mypkg.subpkg.bar` is compeltely
# ignored.
import mypkg
mypkg.foo(42) # $ call=mypkg.foo(..) qlclass=ClassCall arg_0=[pre]mypkg.foo(..)
mypkg.foo(42)
mypkg.subpkg.bar(43)
except:
pass