Commit missing parts of a5bb4a24.

This commit is contained in:
whitequark 2016-05-10 02:12:57 +00:00
parent a5bb4a24af
commit 0826ceb8ba
2 changed files with 1 additions and 6 deletions

View File

@ -599,7 +599,7 @@ class ARTIQIRGenerator(algorithm.Visitor):
self.append(ir.Reraise())
def visit_Raise(self, node):
if types.is_exn_constructor(node.exc.type):
if node.exc is not None and types.is_exn_constructor(node.exc.type):
self.raise_exn(self.alloc_exn(node.exc.type.instance), loc=self.current_loc)
else:
self.raise_exn(self.visit(node.exc), loc=self.current_loc)

View File

@ -1,5 +0,0 @@
# RUN: %python -m artiq.compiler.testbench.signature +diag %s >%t
# RUN: OutputCheck %s --file-to-check=%t
# CHECK-L: ${LINE:+1}: note: this value is an exception constructor; use IndexError() instead
raise IndexError