projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b639018
)
Vile hack to get tests working.
author
Robert Bradshaw
<robertwb@gmail.com>
Tue, 3 Jul 2012 17:27:37 +0000
(10:27 -0700)
committer
Robert Bradshaw
<robertwb@gmail.com>
Tue, 3 Jul 2012 17:27:37 +0000
(10:27 -0700)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index
d4b1b7f
..
2367f2b
100755
(executable)
--- 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):