This website requires JavaScript.
Explore
Help
Sign In
github
/
semantic
Watch
1
Star
1
Fork
0
You've already forked semantic
mirror of
https://github.com/github/semantic.git
synced
2024-12-28 09:21:35 +03:00
Code
Issues
Projects
Releases
Wiki
Activity
5c8bc7846a
semantic
/
semantic-python
/
test
/
fixtures
/
2-02-return-doesnt-translate.py
7 lines
106 B
Python
Raw
Normal View
History
Unescape
Escape
Use `rec` so functions can refer to themselves in their bodies. 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.
2019-10-17 00:34:43 +03:00
# CHECK-TREE: { foo <- rec foo = (\a -> a); #record { foo: foo } }
Add test cases for translating early returns.
2019-09-11 18:43:11 +03:00
def
foo
(
a
)
:
return
a
a
(
)
Reference in New Issue
Copy Permalink