forked from M-Labs/artiq
Previously, any type would be accepted for the test expression, leading to internal errors in the code generator if the passed value wasn't in fact a bool.
7 lines
186 B
Python
7 lines
186 B
Python
# RUN: %python -m artiq.compiler.testbench.inferencer %s >%t
|
|
# RUN: OutputCheck %s --file-to-check=%t
|
|
|
|
# CHECK-L: def foo(val:bool)->numpy.int?:
|
|
def foo(val):
|
|
return 1 if val else 0
|