Commit 407195bd authored by Stefan Behnel's avatar Stefan Behnel

guard against unknown index when inferring indexed item type

parent 9e55c72a
......@@ -3856,7 +3856,7 @@ class SliceIndexNode(ExprNode):
def inferable_item_node(self, index=0):
# slicing shouldn't change the result type of the base, but the index might
if self.start:
if index is not not_a_constant and self.start:
if self.start.has_constant_result():
index += self.start.constant_result
else:
......
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