mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-05 09:46:36 +08:00
16 lines
347 B
Python
16 lines
347 B
Python
# RUN: %python -m artiq.compiler.testbench.signature +diag %s >%t
|
|
# RUN: OutputCheck %s --file-to-check=%t
|
|
|
|
if False:
|
|
t = 1
|
|
|
|
# CHECK-L: ${LINE:+1}: error: variable 't' can be captured in a closure uninitialized
|
|
l = lambda: t
|
|
|
|
# CHECK-L: ${LINE:+1}: error: variable 't' can be captured in a closure uninitialized
|
|
def f():
|
|
return t
|
|
|
|
l()
|
|
f()
|