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: ...@@ -1611,6 +1611,7 @@ if VALUE is not None:
decorator.pos, decorator.pos,
function = decorator.decorator, function = decorator.decorator,
args = [rhs]) args = [rhs])
def_node.decorators = None
assmt = Nodes.SingleAssignmentNode( assmt = Nodes.SingleAssignmentNode(
def_node.pos, def_node.pos,
......
...@@ -13,3 +13,12 @@ class TestClassDecorator(object): ...@@ -13,3 +13,12 @@ class TestClassDecorator(object):
""" """
def hello(self): def hello(self):
return "Hello, world!" 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