Ticket #60, compiler crash on bad array
authorRobert Bradshaw <robertwb@math.washington.edu>
Wed, 29 Oct 2008 00:33:00 +0000 (17:33 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Wed, 29 Oct 2008 00:33:00 +0000 (17:33 -0700)
Cython/Compiler/ExprNodes.py

index c294d2c196a185d9cb259f0894b5ff58cf1e0bb4..7d9dee5fbef9befb0fe8867ac6a788d11b4ff800 100644 (file)
@@ -1553,9 +1553,9 @@ class IndexNode(ExprNode):
                 self.index.analyse_types(env, skip_children=skip_child_analysis)
             elif not skip_child_analysis:
                 self.index.analyse_types(env)
+            self.original_index_type = self.index.type
             if self.base.type.is_pyobject:
                 if self.index.type.is_int and not self.index.type.is_longlong:
-                    self.original_index_type = self.index.type
                     self.index = self.index.coerce_to(PyrexTypes.c_py_ssize_t_type, env).coerce_to_simple(env)
                 else:
                     self.index = self.index.coerce_to_pyobject(env)