summaryrefslogtreecommitdiff
path: root/tests/functional/r/regression_02/regression_property_slots_2439.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/r/regression_02/regression_property_slots_2439.py')
-rw-r--r--tests/functional/r/regression_02/regression_property_slots_2439.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/functional/r/regression_02/regression_property_slots_2439.py b/tests/functional/r/regression_02/regression_property_slots_2439.py
new file mode 100644
index 000000000..43882b3ac
--- /dev/null
+++ b/tests/functional/r/regression_02/regression_property_slots_2439.py
@@ -0,0 +1,22 @@
+# pylint: disable=missing-docstring,invalid-name,too-few-public-methods
+# https://github.com/pylint-dev/pylint/issues/2439
+class TestClass:
+ __slots__ = ["_i"]
+
+ def __init__(self):
+ self._i = 0
+
+ @property
+ def i(self):
+ return self._i
+
+ @i.setter
+ def i(self, v):
+ self._i = v
+
+ other = i
+
+
+instance = TestClass()
+instance.other = 42
+print(instance.i)