mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Python: Add test-case with swapped decorator order
This commit is contained in:
@@ -3,3 +3,5 @@
|
||||
| test.py:17:15:17:17 | ControlFlowNode for cls | self instance of Foo |
|
||||
| test.py:22:15:22:17 | ControlFlowNode for cls | class Foo |
|
||||
| test.py:22:15:22:17 | ControlFlowNode for cls | self instance of Foo |
|
||||
| test.py:27:15:27:17 | ControlFlowNode for cls | class Foo |
|
||||
| test.py:27:15:27:17 | ControlFlowNode for cls | self instance of Foo |
|
||||
|
||||
@@ -21,9 +21,15 @@ class Foo(object):
|
||||
def problem_through_class(cls):
|
||||
check(cls) # same as above
|
||||
|
||||
@classmethod
|
||||
@some_decorator
|
||||
def also_problem(cls):
|
||||
check(cls) # same as above
|
||||
|
||||
# We need to call the methods before our analysis works
|
||||
f1 = Foo()
|
||||
f1.no_problem()
|
||||
f1.problem_through_instance()
|
||||
f1.also_problem()
|
||||
|
||||
Foo.problem_through_class()
|
||||
|
||||
Reference in New Issue
Block a user