Commit 7c01e848 authored by Vitja Makarov's avatar Vitja Makarov

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

parent ed5ff92d
...@@ -23,6 +23,7 @@ from Nodes import Node ...@@ -23,6 +23,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
...@@ -5276,6 +5277,8 @@ class GeneratorExpressionNode(LambdaNode): ...@@ -5276,6 +5277,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