Commit f55ea374 authored by Vitja Makarov's avatar Vitja Makarov

Force genexpr's signature to be noargs, fix ticket #720

--HG--
extra : transplant_source : %B1-f%40%DD%BE/jp%D6%1F%C8I%9C%C3%7D%7DL%FC%00
parent 9f587be7
...@@ -24,6 +24,7 @@ from Nodes import Node ...@@ -24,6 +24,7 @@ from Nodes import Node
import PyrexTypes import PyrexTypes
from PyrexTypes import py_object_type, c_long_type, typecast, error_type, \ from PyrexTypes import py_object_type, c_long_type, typecast, error_type, \
unspecified_type unspecified_type
import TypeSlots
from Builtin import list_type, tuple_type, set_type, dict_type, \ from Builtin import list_type, tuple_type, set_type, dict_type, \
unicode_type, str_type, bytes_type, type_type unicode_type, str_type, bytes_type, type_type
import Builtin import Builtin
...@@ -5251,6 +5252,8 @@ class GeneratorExpressionNode(LambdaNode): ...@@ -5251,6 +5252,8 @@ class GeneratorExpressionNode(LambdaNode):
def analyse_declarations(self, env): def analyse_declarations(self, env):
self.def_node.no_assignment_synthesis = True self.def_node.no_assignment_synthesis = True
self.def_node.analyse_declarations(env) self.def_node.analyse_declarations(env)
# Force genexpr signature
self.def_node.entry.signature = TypeSlots.pyfunction_noargs
env.add_lambda_def(self.def_node) env.add_lambda_def(self.def_node)
def generate_result_code(self, code): def generate_result_code(self, code):
......
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