mirror of
https://github.com/github/semantic.git
synced 2024-12-30 10:27:45 +03:00
01b4a23b23
Code like the following kind is legal in Python: ```python def recursive(a): return recursive ``` This implies that function and class definitions need to use the Core `rec` construct so that their bodies have an appropriate entry in the scope.
5 lines
214 B
Python
5 lines
214 B
Python
# CHECK-TREE: { const <- rec const = \x -> \y -> x; y <- const #true #true; z <- const #false #false; #record { const: const, y : y, z: z, }}
|
|
def const(x, y): return x
|
|
y = const(True, True)
|
|
z = const(False, False)
|