summaryrefslogtreecommitdiff
path: root/python/testData/inspections/PyUnresolvedReferencesInspection/returnSelfInSuperClass.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/testData/inspections/PyUnresolvedReferencesInspection/returnSelfInSuperClass.py')
-rw-r--r--python/testData/inspections/PyUnresolvedReferencesInspection/returnSelfInSuperClass.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/returnSelfInSuperClass.py b/python/testData/inspections/PyUnresolvedReferencesInspection/returnSelfInSuperClass.py
new file mode 100644
index 000000000000..79c56a020033
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/returnSelfInSuperClass.py
@@ -0,0 +1,13 @@
+class C(object):
+ def get_self(self):
+ return self
+
+
+class D(C):
+ def foo(self):
+ pass
+
+
+d = D()
+print(d.foo())
+print(d.get_self().foo()) # pass