Files
openide/python/testData/refactoring/inlineFunction/specialMethod.py
Aleksei Kniazev 72e1763f81 IDEA-CR-49176: disallow function inlining for python special methods (PY-36461)
GitOrigin-RevId: e1049aec62e8c8240a555fdf818820e797d5c9a6
2019-07-08 18:05:36 +03:00

9 lines
189 B
Python

class Additive:
def __init__(self, value):
self.value = value
def __add__(self, other):
return Additive(self.value + other.value)
Additive(1) +<caret> Additive(1)