From bb3dfdb4f99dc8c37b6aa9672ac59c63d0b823f7 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 30 Nov 2010 07:58:52 +0100 Subject: [PATCH] fix type inference for ResultRefNode --- Cython/Compiler/UtilNodes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cython/Compiler/UtilNodes.py b/Cython/Compiler/UtilNodes.py index 4b5a90c3..5222b39e 100644 --- a/Cython/Compiler/UtilNodes.py +++ b/Cython/Compiler/UtilNodes.py @@ -141,6 +141,9 @@ class ResultRefNode(AtomicExprNode): def infer_type(self, env): if self.expression is not None: return self.expression.infer_type(env) + if self.type is not None: + return self.type + assert False, "cannot infer type of ResultRefNode" def may_be_none(self): if not self.type.is_pyobject: -- 2.26.2