From 865e8ea4acba239a222920a20bae6e9631ba8d2c Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Tue, 3 Jul 2012 10:27:37 -0700 Subject: [PATCH] Vile hack to get tests working. --- Cython/Compiler/ExprNodes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index d4b1b7f..2367f2b 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2226,8 +2226,11 @@ class NextNode(AtomicExprNode): else: # Avoid duplication of complicated logic. fake_index_node = IndexNode(self.pos, - base=self.iterator, + base=self.iterator.sequence, index=IntNode(self.pos, value='0')) + # TODO(vile hack): infer_type should be side-effect free + if isinstance(self.iterator.sequence, SimpleCallNode): + return py_object_type return fake_index_node.infer_type(env) def analyse_types(self, env): -- 2.7.4