add assert to find cases where we fail to generate code for indexing/slicing
authorStefan Behnel <stefan_ml@behnel.de>
Sun, 3 Nov 2013 15:04:25 +0000 (16:04 +0100)
committerStefan Behnel <stefan_ml@behnel.de>
Sun, 3 Nov 2013 15:04:25 +0000 (16:04 +0100)
--HG--
extra : amend_source : b6140bfd07fdf9ae0c7dde2037b3cbff682260e7

Cython/Compiler/ExprNodes.py

index cfda7c0..d6b7dd7 100644 (file)
@@ -3372,6 +3372,9 @@ class IndexNode(ExprNode):
                         self.extra_index_params(code),
                         self.result(),
                         code.error_goto(self.pos)))
+            else:
+                assert False, "unexpected type %s and base type %s for indexing" % (
+                    self.type, self.base.type)
 
     def generate_setitem_code(self, value_code, code):
         if self.index.type.is_int: