Commit 6aa5a11e authored by Stefan Behnel's avatar Stefan Behnel

fix compiler crash during type inference of indexed ctuples

parent 2ed50c7f
...@@ -2924,6 +2924,7 @@ class IndexNode(ExprNode): ...@@ -2924,6 +2924,7 @@ class IndexNode(ExprNode):
elif base_type.is_ptr or base_type.is_array: elif base_type.is_ptr or base_type.is_array:
return base_type.base_type return base_type.base_type
elif base_type.is_ctuple and isinstance(self.index, IntNode): elif base_type.is_ctuple and isinstance(self.index, IntNode):
if self.index.has_constant_result():
index = self.index.constant_result index = self.index.constant_result
if index < 0: if index < 0:
index += base_type.size index += base_type.size
......
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