forked from M-Labs/artiq
6bf95397d7
Since the package implements a typechecker along with a code generator, and the typechecker will be run before or together with transformations, this name is more descriptive.
14 lines
295 B
Python
14 lines
295 B
Python
# RUN: %python -m artiq.compiler.typing %s >%t
|
|
|
|
def _gcd(a, b):
|
|
if a < 0:
|
|
a = -a
|
|
while a:
|
|
c = a
|
|
a = b % a
|
|
b = c
|
|
return b
|
|
|
|
# CHECK-L: _gcd:(a:int(width='a), b:int(width='a))->int(width='a)(10:int(width='a), 25:int(width='a)):int(width='a)
|
|
_gcd(10, 25)
|