Commit 5aac8caf authored by Stefan Behnel's avatar Stefan Behnel

partially reverted change that generally checked for None on object indexing -...

partially reverted change that generally checked for None on object indexing - seems to trigger crashes in Py3.2 for some reason
parent 9d5cb520
......@@ -2663,7 +2663,6 @@ class IndexNode(ExprNode):
self.base = self.base.coerce_to_pyobject(env)
base_type = self.base.type
if base_type.is_pyobject:
self.base = self.base.as_none_safe_node("'NoneType' object is unsubscriptable")
if self.index.type.is_int:
if (not setting
and (base_type in (list_type, tuple_type))
......@@ -2686,6 +2685,8 @@ class IndexNode(ExprNode):
elif is_slice and base_type in (bytes_type, str_type, unicode_type, list_type, tuple_type):
self.type = base_type
else:
if base_type is dict_type:
self.base = self.base.as_none_safe_node("'NoneType' object is unsubscriptable")
self.type = py_object_type
else:
if base_type.is_ptr or base_type.is_array:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment