mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Python: CG trace: Add examples of multiple calls on one line
There are currently 16 InvalidRecordedCall
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
def one(*args, **kwargs):
|
||||
print("one")
|
||||
return 1
|
||||
|
||||
def two(*args, **kwargs):
|
||||
print("two")
|
||||
return 2
|
||||
|
||||
def three(*args, **kwargs):
|
||||
print("three")
|
||||
return 3
|
||||
|
||||
one(); two()
|
||||
print("---")
|
||||
|
||||
one(); one()
|
||||
print("---")
|
||||
|
||||
alias_one = one
|
||||
alias_one(); two()
|
||||
print("---")
|
||||
|
||||
three(one(), two())
|
||||
print("---")
|
||||
|
||||
three(one(), two=two())
|
||||
print("---")
|
||||
|
||||
def f():
|
||||
print("f")
|
||||
|
||||
def g():
|
||||
print("g")
|
||||
|
||||
return g
|
||||
|
||||
f()()
|
||||
Reference in New Issue
Block a user