Commit c4fe3e0c authored by Stefan Behnel's avatar Stefan Behnel

propagate constant_result when folding lists into tuples

parent 72020fc3
...@@ -5497,7 +5497,10 @@ class ListNode(SequenceNode): ...@@ -5497,7 +5497,10 @@ class ListNode(SequenceNode):
return self return self
def as_tuple(self): def as_tuple(self):
return TupleNode(self.pos, args=self.args, mult_factor=self.mult_factor) t = TupleNode(self.pos, args=self.args, mult_factor=self.mult_factor)
if isinstance(self.constant_result, list):
t.constant_result = tuple(self.constant_result)
return t
def release_temp_result(self, env): def release_temp_result(self, env):
if self.type.is_array: if self.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