Commit c6951de8 authored by Stefan Behnel's avatar Stefan Behnel

be more verbose in compiler crash case when temp result name is missing

parent d9e546ed
...@@ -344,7 +344,10 @@ class ExprNode(Node): ...@@ -344,7 +344,10 @@ class ExprNode(Node):
def result(self): def result(self):
if self.is_temp: if self.is_temp:
assert self.temp_code if not self.temp_code:
pos = (os.path.basename(self.pos[0].get_description()),) + self.pos[1:] if self.pos else '(?)'
raise RuntimeError("temp result name not set in %s at %r" % (
self.__class__.__name__, pos))
return self.temp_code return self.temp_code
else: else:
return self.calculate_result_code() return self.calculate_result_code()
......
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