From 333b8c79fa61deded46ea93a30536d85002af771 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sun, 18 Jul 2010 00:41:25 -0700 Subject: [PATCH] Fix #549, compiler crash on bad template type. --- Cython/Compiler/Nodes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 55b57562..f496c4be 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -832,7 +832,11 @@ class TemplatedTypeNode(CBaseTypeNode): else: template_types = [] for template_node in self.positional_args: - template_types.append(template_node.analyse_as_type(env)) + type = template_node.analyse_as_type(env) + if type is None: + error(template_node.pos, "unknown type in template argument") + return error_type + template_types.append(type) self.type = base_type.specialize_here(self.pos, template_types) elif base_type.is_pyobject: -- 2.26.2