Commit f1690b11 authored by Vitja Makarov's avatar Vitja Makarov

Set DefNode's decorators to None after assignment synthesis

parent 6b692963
......@@ -1611,6 +1611,7 @@ if VALUE is not None:
decorator.pos,
function = decorator.decorator,
args = [rhs])
def_node.decorators = None
assmt = Nodes.SingleAssignmentNode(
def_node.pos,
......
......@@ -13,3 +13,12 @@ class TestClassDecorator(object):
"""
def hello(self):
return "Hello, world!"
@decorate(lambda x: x)
def test_function():
"""
>>> test_function()
123
"""
return 123
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment