Fix #549, compiler crash on bad template type.
authorRobert Bradshaw <robertwb@math.washington.edu>
Sun, 18 Jul 2010 07:41:25 +0000 (00:41 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sun, 18 Jul 2010 07:41:25 +0000 (00:41 -0700)
Cython/Compiler/Nodes.py

index 55b575628758de2309ed46e126bff00576447e7e..f496c4bec2ee8fc05b316a01adb65c9f0b179c81 100644 (file)
@@ -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: