diff --git a/lit-test/test/inferencer/error_class.py b/lit-test/test/inferencer/error_class.py index dbb399494..0cc075b05 100644 --- a/lit-test/test/inferencer/error_class.py +++ b/lit-test/test/inferencer/error_class.py @@ -8,9 +8,3 @@ class a(1): class b: # CHECK-L: ${LINE:+1}: fatal: class body must contain only assignments and function definitions x += 1 - -class c: - pass -# CHECK-L: ${LINE:+1}: fatal: variable 'c' is already defined -class c: - pass diff --git a/lit-test/test/inferencer/error_class_redefine.py b/lit-test/test/inferencer/error_class_redefine.py new file mode 100644 index 000000000..d5556fd98 --- /dev/null +++ b/lit-test/test/inferencer/error_class_redefine.py @@ -0,0 +1,8 @@ +# RUN: %python -m artiq.compiler.testbench.inferencer +diag %s >%t +# RUN: OutputCheck %s --file-to-check=%t + +class c: + pass +# CHECK-L: ${LINE:+1}: fatal: variable 'c' is already defined +class c: + pass