Files
codeql/python/ql/test/experimental/library-tests/CallGraph/code/shadowing.py
Rasmus Wriedt Larsen e7a337991a Python: Accept fix from extractor change
namely the variable access mentioned in
https://github.com/github/codeql/pull/10171
2022-11-22 14:46:30 +01:00

23 lines
308 B
Python

def foo(n=0):
print("foo", n)
if n > 0:
foo(n-1) # $ pt,tt=foo
foo(1) # $ pt,tt=foo
def test():
def foo():
print("test.foo")
foo() # $ pt,tt=test.foo
class A(object):
def foo(self):
print("A.foo")
foo() # $ pt,tt=foo
a = A()
a.foo() # $ pt,tt=A.foo