mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-24 19:04:02 +08:00
Commit missing parts of a5bb4a24
.
This commit is contained in:
parent
a5bb4a24af
commit
0826ceb8ba
@ -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)
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user